Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: roles management (multi-profile) #24

Closed
fabriceci opened this issue Aug 7, 2016 · 11 comments
Closed

Feature request: roles management (multi-profile) #24

fabriceci opened this issue Aug 7, 2016 · 11 comments

Comments

@fabriceci
Copy link
Contributor

fabriceci commented Aug 7, 2016

I think it will be nice to have a simple roles management.

Suggestion:

We can add a new constructor with an array of roles as extra parameters. By default, if nothing is provided (actual case) a user has all roles.

When the file manager start, it does an extra request to get the user roles to the connector. (It does not seem too hard to implement because the logic is already implemented with the "has_capability" functions.)

This will real plus in a CMS usage or when you have different profiles of users that use the file manager in your app.

@fabriceci fabriceci changed the title Feature request: role management (multi-profile) Feature request: roles management (multi-profile) Aug 7, 2016
@psolom
Copy link
Owner

psolom commented Aug 7, 2016

What is the purpose of that?
If you want to disable/enable filemanager for some users depending on their role you could implement this in filemanager.php::auth()

@fabriceci
Copy link
Contributor Author

fabriceci commented Aug 7, 2016

To be more granular.

If your app has x group of users and you want to give different rights, for example :

  • User : can access to the FM, select or download a file.
  • Admin : all above + upload/delete files + zip
  • Super admin : all above + unzip files

(by default, the actual case, user has all roles )

@psolom
Copy link
Owner

psolom commented Aug 7, 2016

I see now, may be interesting feature.
Do you want to implement it with a new PR?

@fabriceci
Copy link
Contributor Author

fabriceci commented Aug 7, 2016

Yes, I will do that but before I would like:

  • finish my java connector (maybe merge with the work of @gmkll)
  • see if I can improve the visual with a new more modern theme

@psolom
Copy link
Owner

psolom commented Aug 7, 2016

Great!
Concerning to PR #21, I would like you to communicate with @gmkll. I prefer that one of you take a lead on implementing Java connector to not create a various PR for that purpose. You can create new issue if you need to discuss all the things with him.

@psolom
Copy link
Owner

psolom commented Aug 7, 2016

Of course if you both work on the same connector.

@fabriceci
Copy link
Contributor Author

fabriceci commented Aug 7, 2016

Connectors are very close, but I can't use the @gmkll without modifications. I will open
in the coming days a new issue and discuss with him to see what we will do.

@psolom
Copy link
Owner

psolom commented Aug 7, 2016

That's would be great.
He, also made a number of modifications in JS file, which I have to review anyway.

@jlaustill
Copy link
Contributor

I have a similar need that I will be implementing into my node connector. In my case, I need to block access to files based upon user roles. So my root folder will have folders for each role, and each request will verify that the user has the role that matches the folders name or they will be denied. This way I can have groups that have private files. I will write it in such a way that it can be easily ignored, aka, opt-in. Node uses a standard user configuration that roles can be added to, I'm not sure how it would work in other connectors except .net. I did this to my current .net connector, but it was horribly messy and non-standard so I never even thought about passing it back as a pull request. My node connector I will, though. I will go to lengths to make it standard compliant and clean.

@psolom
Copy link
Owner

psolom commented Nov 4, 2016

Solved with the RichFilemanager release v2.0.0
See "setAllowedActions()" method called from filemanager.php. Feel free to reopen the issue if you have any advanced ideas on this subject.

@psolom psolom closed this as completed Nov 4, 2016
@hathemi
Copy link

hathemi commented Dec 26, 2018

@fabriceci @servocoder is it possible to do to give different rights to user, admin or superadmin,.. with filemanajer.js node connector?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants