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

Need more document on how to addRole / addPermission using this repository #50

Open
vrkansagara opened this issue Feb 26, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@vrkansagara
Copy link

I was searching the document on how can I addRole or permission using this repo. but I didnt find any suitable information under the hood of this link. https://github.com/LM-Commons/LmcRbacMvc/tree/master/docs/docs

@visto9259 visto9259 added the documentation Improvements or additions to documentation label Feb 26, 2024
@visto9259
Copy link
Member

LmcRbacMvc does not provide functionality to manage roles.
It provides listeners and services to check that a user has the permission to use a resource. This is done my checking the role of the user, as provided by the user entity against the roles and permissions of the resource. It uses Role providers to get roles and permissions. There is a simple InMemoryRoleProvider that uses a config array to provide the roles and permissions definition. This is documented here: https://lm-commons.github.io/LmcRbacMvc/docs/role-providers
You can implement your own based on a database if you want or use the ORM provider.
Is expects the user entity to implement the LaminasRbcMvc\Identity\IdentityInterface such that it can provides the roles of the user.
But I agree that documentation can be improved and a tutorial would help.

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

No branches or pull requests

2 participants