-
Notifications
You must be signed in to change notification settings - Fork 139
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
add user role/permission to module fd2_example #690
base: main
Are you sure you want to change the base?
add user role/permission to module fd2_example #690
Conversation
Having the demonstration of how to access the roles in the example would be great. Can you add those to the API example page again and include that in this PR? Place the displayed roles just below the username. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work getting the roles added to the JS variables! Well done.
I added a comment about moving the illustration from the "Maps" example to the "Vars" example where it fits more naturally.
Also, there is a test file fd2_example/vars.uid.spec.js
that tests that the JS variables for the user ID and username work correctly. Please extend the tests in that file to include assertions (.should
) about the roles that the user has.
This all appears to be working well within the |
Pull Request Description
close #447
Add role/permission to login user, currently it must be imported in each module the same way like uid and name property. There could be a way to refactor so that every modules can have a common file to import from. Image below is from sub tab
fd2_example
, and I have remove thatp
tag in the commit, but the usage is straightforward.Licensing Certification
FarmData2 is a Free Cultural Work and all accepted contributions are licensed as described in the LICENSE.md file. This requires that the contributor holds the rights to do so. By submitting this pull request I certify that I satisfy the terms of the Developer Certificate of Origin for its contents.