Here is my enum values defined
public enum authaccess
{ read=0,create=1,update=2,delete=4}
As a Access Table looks like as below.
|id | tablename |columnname|permitted|
|----|-----------|----------|---------|
|1 | cms |header |3 |
|2 | cms |footer |2 |
|3 | cms |content |7 |
read access is permitted for all content, while 3 is for(create + update), and 7 for all rights.
As I need (x) button enabled in div where loggedInUser has delete authority
Using Linq, I used
new DbContext().tbl_access.where(k=>k.permitted > authaccess.delete){divid.class.add('close')}
but could not find a way to get a list of contents that can be changed by user ie 3 or (authaccess.create + authaccess.update)
[Clarification on edit] The resultant table should be
|id | tablename |columnname|permitted|
|----|-----------|----------|---------|
|1 | cms |header |3 |
|2 | cms |footer |2 |
Because (header and footer) include create+update level access which is less than or equal to 3.
Thanks in advance for any help.