add user role/permission to module fd2_example#690
add user role/permission to module fd2_example#690nguyenbanhducA1K51 wants to merge 3 commits intoDickinsonCollege:mainfrom
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. |
braughtg
left a comment
There was a problem hiding this comment.
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 thatptag 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.