We're in the process of upgrading/improving our application framework, and we're currently looking into (application) user groups and roles. We want to implement CRUD rights to our screens. What's in place is a kind of ORM, so there's a class for each table already. Am just looking for ideas on how to get this built as generic as possible.
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Recommended Answers
Jump to PostA general, generic system would have you define a table to store your groups, a table to store what permissions that group has and a table to assign users to groups.
I would then translate that into C# and assign roles to your screens.
The other option is to be …
Jump to PostAre you thinking about storing the screen class name mapped against one or more roles?
Or use attributes. But the attributes would have to match your DB permissoin names and any changes would have to be retrospective too...
Jump to PostIn that case no, your only real option is to match the Ids of your screens to the roles required, in your DB.
All 9 Replies
Ketsuekiame
860
Master Poster
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Ketsuekiame
860
Master Poster
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Ketsuekiame
860
Master Poster
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Ketsuekiame
860
Master Poster
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.