Senior Rights Management System

In any system design is the most basic rights of things, a good permissions system, developers can enhance the development progress; but they can provide users with perfect scalability rights management, rather than a simple custom permissions.
In this paper, the realization of functions: the role-based permissions granularity + module + the rights management related concepts:
(1) the role: It is a collection of a class of functions, such as the role of news editor, who may be the drafting of news, editorial features such as the news set, and the responsibility he may have more to edit the permissions, for example, in addition to the functions of news editors, but also assesses news, delete news operation-level granularity; this can be understood as the design of the group process.
(2) permissions granularity: it is the smallest units, such as the drafting of news, editorial news, review news, delete news
(3) users: is a system of end-use customers (including managers and managers)
(4) resources: Managed Object

The following simulation of an information system for the control of data:

Senior Rights Management System

(Figure 1. Permissions diagram)

User information table:

UserID


UserName


U1


San


U2


Li



Role as follows:

RoleID


RoleName


R1


News Editor


R2


Editor



The role of the user table:

RoleID


UserID


R1


U1


R2


U2



Permissions size table:

PrivilegeID


ResourceType


PrivilegeTitle

P1


NTA


Drafting News: Category A


P2


NTA


Editor News: Category A


P3


NTA


Audit News: Category A


P4


NTA


Delete News: Category A


P1


NTB


Drafting News: Category B


P2


NTB


Editor News: Category B


P3


NTB


Audit News: Category B


P4


NTB


Delete News: Category B



Note: This table has the resources there to add (module) information


The role of authority as follows:

RoleID


PrivilegeID


R1


P1


R1


P2


R2


P1


R2


P2


R2


P3


R2


P4



Determine whether a user has permissions to the realization of a module:
# Access privileges (Privileges) statement:
Select PrivilegeID + `,` + ResourceType From role permissions table Where RoleID In (Select RoleID From the user role table Where UserID = 'U1')

# Permission of the judge
Privileges.Contain ( 'F1, NTA');


Add a new classification at the same time also increase the authority table corresponding records (of course not in the database to add it directly from the function and powers related to add).
The use of such solutions can be simply applied for the classification (such as the forum system) for each classification of different control (such as the VIP section, we only have the role of VIP users can browse, published, etc., while the other plate as long as it is Registered users can use it).

PrivilegeID in practical applications is not just a string, but a code, the code contains a module ID, as well as to reflect the relationship between father and son, To give an example: For the forum system, we give it a module ID for "30", the forum permissions, we first divided into 2 categories, category management (such as the deletion of posts), is the use of a class (for example, post replies, post views, etc.), to the management of a code: 01, the use of type a code: 02, we carried out on PrivilegeID the following code:
300101: Delete post
300201: Posting
300202: replies
300203: View Posts

Resources (such as a plate 1, plate ID is: 01), we can mix the following Privileges (Of course, this combination you can not have a comma-separated, use of other combinations can also be, but not ambiguous):
300101,01: plate 1, the function of deleted posts
300201,01: the function of plate 1 post
... ...
RoleID is also used for encoding, but also reflect the role of the father and son relationship, but also can function in the role of inheritance, etc. (Of course, the role of functional access to the list of SQL statements is not so simple now). Application in which I now do not inherit the realization of the role (although the role of encoding reflects the relationship between the roles of father and son).
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Senior Rights Management System

  • javascript to avoid the floating-point bug Ways (reprint, provenance unknown)

    Recently, at a wage to do the accounting system, all at the Front Desk for all computing, it is used JS to do. After finishing, the accounting manual and found a strange problem. JS is the result calculated with the use of calculators has calculated ...

  • Maven2 integration to build a J2EE project

    1. Background Maven2 basic principle is very simple, the use of remote storage and local storage, as well as pom (project object model). Xml, will be defined in pom.xml files from remote storage jar download to a local warehouse, all applications usi ...

  • combination of rails and XForms (1) (see IBM out-patient)

    (1) rails xforms-d mysql Edit database.yml . / script / generate scaffold user information: text rake db: create: all rake db: migrate Add a user New add_user.xhtml <xf:submission action="/users/create" method="post" /> desi ...

  • XForms combines rails and (2) (see IBM out-patient)

    (2) modify user . / script / generate controller load loading load_all Generate a controller and a load and load_all two action Add Page edit_user.xhtml Look at the load / loading of the action Modify template index.erb Modify users / update Click Ed ...

  • combination of rails and XForms (3) (see IBM out-patient)

    (3) query information Add a XQuery query page load / load_all code This will query the data, and the back can also add some modifications such as one type of operation Ibm is a more detailed out-of the rails

  • Seven. DWR target range

    DWR target range DWR in the application when necessary to create a business object, which is a remote business object. Through the Front Desk client is js script, go visit the subject of this background, the background object is bound to have a role ...

  • Software Development Methods

    Waterfall Development Method: This is an ideal state of development. All under the level based on job level. Once on the job level, the problems could not be delivered to the next level of working hours, the whole team are parked in it yes. Spiral de ...

  • js input to determine whether or not a positive integer. Float figure such as a function of

    js input to determine whether or not a positive integer, floating-point numbers, such as a function of figure 1. The following is a list of some types of numerical interpretation of regular expressions "^ \ \ d + $" / / non-negative integer ...

  • ruby installation

    extraordinary ruby is a language, but do not have the heart of the study it will no avail. The same as the same, it will gradually been paying attention, I believe. This paper describes only how to install ruby under windows study, development enviro ...

  • Universal Data Access Control System Design

    Figure II: general data rights management system database design Comparison of two maps, we can see that the main changes between them are: 1, increase system resources, information and operation type information, the system resources for the tree st ...

Leave a Reply

Recent
Recent Entries
Tag Cloud
Random Entries