five sheets of ASP. NET Rights Management
Rights-Managed tables (5 tables)
some information that must be in each table
Serial number |
Name
|
Field
|
Type
|
Primary key
|
Default value |
is empty |
Note |
1 |
User ID
|
Id
|
Int
|
Is
|
Null
|
Whether
|
User ID
|
2 |
User name |
UserName |
varchar (100) |
Whether |
Null |
Whether |
User name |
3 |
User password |
UserPassword |
varchar (20) |
Whether |
Null
|
Whether |
User password |
4 |
State |
Status |
smallint |
Whether |
Null |
Whether |
Valid 1, Invalid 0 |
5 |
Creator |
createuser |
varchar (+) |
no |
null |
no |
creator |
6 |
Creation Date |
creatadate |
datetime |
no |
null |
no |
creation date |
7 |
Modifier |
lastupdateuser |
varchar (+) |
no |
null |
no |
modifier |
8 |
Modification time |
LastUpdateTime |
Datetime |
Whether |
Null |
Whether |
Modified Date |
Query whether the user has permission
select * from [User] u
left join UserRole ur on u.ID = ur.UserID
left join Role r on r.ID = ur.RoleID
left join PrivilegeRole p on p.RoleID = r.RoleID
left join PrivilegeRole pr on pr.PrivilegeID = p.PrivilegeID
You can determine the permissions of the UserID in the actionexceuting and decide whether to enter the action according to the permission
From for notes (Wiz)
Asp. net-Rights Management Five sheets