Git Product home page Git Product logo

Comments (3)

effgarces avatar effgarces commented on August 18, 2024

I believe you are correct, the resource permissions are not checked when filling the slots in the schedule view. From what I can gather, especially from our usage, the settings to show/hide that information, only allow to control if guest/registered can see them or if only the admin can see it, there's no in-between. Ideally the resource permissions would be checked so that those items would be auto-hidden from a user without permissions.
In our usage case, we set the permissions so that only the admin could see them (hide.reservation.details = true and hide.user.details = true) and we also added some of our inventory behind groups/schedules, to which people get added manually, afterwards they can then see/reserve those items, so using this technique we have avoided needing to control individual resources permissions.

It certainly is an incomplete implementation of the permissions system and as such it will probably need a bit of a dive into to the code to add that missing feature. I won't make promises of when I can add this, but I will keep it in mind and also mark it as an enhancement so I don't overlook it.

PS I almost forgot, there's also a setting for each resource that controls whether a user receives permissions to it automatically "Permission is automatically granted", so if you don't want users to have that access granted immediately, take a look at that setting

image

from app.

QuasiMoko avatar QuasiMoko commented on August 18, 2024

Hi,
I assumed that this would need a deeper dive into the code.
The Option Permission is automatically granted was already switched off in my systems.
Actually we're using only the user groups to grant permissions.

Nevertheless Thank You

from app.

tjakobi avatar tjakobi commented on August 18, 2024

Hi,

I ran into the same problem today but was able to to find a possible workaround.

lib/Application/Authentication/RegistrationPermissionStrategy.php

contains:

class RegistrationPermissionStrategy implements IRegistrationPermissionStrategy
{
    public function AddAccount(User $user)
    {
        $autoAssignCommand = new AutoAssignPermissionsCommand($user->Id());
        ServiceLocator::GetDatabase()->Execute($autoAssignCommand);
    }
}

I commented out the database execution; otherwise the user creation will always add default permissions for all resources, thus showing up for the newly registered user.

I now can assign users from the default group into a suitable other group that has permission for specific devices - the permissions are correctly updated.

I hope this helps.

Cheers,

Tobias

from app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.