Invention content
The main purpose of the present invention is to provide a kind of control methods of system operatio permission, it is intended to solve current system behaviour
The problem of making to need manual modification operating right code database when operating right is changed in permission control, influence user experience.
To achieve the above object, the present invention provides a kind of control method of system operatio permission, which is characterized in that the system
The control method of system operating right includes the following steps:
When receiving accessing page request, the corresponding page of the accessing page request is obtained;
Obtain the attribute of the operation button in the page;
It is updated in operating right code database according to the attribute of the operation button and is encoded accordingly, so that the operating right
Coding in code database is matched with operation button in the page.
Preferably, the attribute of the operation button includes the identification information and authority information of the operation button.
Preferably, described when receiving accessing page request, obtain the step of the corresponding page of the accessing page request
After rapid, further include:
Obtain the class information of user;
The operating right of the user is obtained according to the class information of the user;
There is the operation button of operating right to carry out on the page the user according to the operating right of the user
Display.
Preferably, the user is had the operation button of operating right described by the operating right according to the user
The step of being shown on the page include:
Whether it is authorized to operate that institute according to user described in the determined property of the operating right of the user and the operation button
State operation button;
When the user is authorized to operate that the operation button, the operation button is shown on the page.
Preferably, described when receiving accessing page request, obtain the step of the corresponding page of the accessing page request
Before rapid, further include:
When receiving the logging request of terminal transmission, whether the username and password for including in the logging request is judged
Correctly;
When the user name and the correct password, System menu is sent to the terminal, so that the terminal is based on
The System menu sends the access request.
Preferably, which is characterized in that it is described when receiving accessing page request, it obtains the accessing page request and corresponds to
The page the step of after, further include:
Obtain the data permission configuration information of user;
The data list that the user possesses is obtained according to the data permission configuration information of the user;
The data list is shown on the page.
Preferably, the data permission configuration information according to the user obtains the data list that the user possesses
Step includes:
Determine the dimension of the data permission configuration information of the user;
Obtain dimension values of the data permission configuration information of the user in the dimension;
The user is obtained every according to the dimension of the data permission configuration information of the user and the dimension values
Possess the data list of permission in a dimension;
The data list that the user is possessed to permission in each dimension takes union, obtains user's ownership
The data list of limit.
Preferably, the dimension of the data permission configuration information of the user includes the department information and project letter of the user
Breath.
In addition, in order to achieve the above object, the present invention also provides a kind of control device of system operatio permission, the system is grasped
The control device for making permission includes:It memory, processor and is stored on the memory and can run on the processor
System operatio permission control program, realized when the control program of the system operatio permission is executed by the processor as above
The step of control method of the system operatio permission.
In addition, in order to achieve the above object, the present invention also provides a kind of storage medium, system is stored on the storage medium
The control program of the control program of operating right, the system operatio permission realizes system as described above when being executed by processor
The step of control method of operating right.
Control method, device and the storage medium for the system operatio permission that the embodiment of the present invention proposes, server receive
When access request, the attribute of all operation buttons in the corresponding page of the accessing page request is obtained, then according to acquisition
To operation button attribute update operating right code database in encode accordingly so that the volume in the operating right code database
Code is matched with the operation button in the page, so that operating right code database can automatically more when operation button is changed
Newly, user experience is improved.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:The present embodiment receives access and asks according to said program, server
When asking, the attribute of all operation buttons in the corresponding page of the accessing page request is obtained, then according to the behaviour got
Make to encode accordingly in the attribute update operating right code database of button, so that the coding in the operating right code database and institute
The operation button matching in the page is stated, so that operating right code database can automatically update when operation button is changed.
Due in the prior art, needing the coding in manual modification operating right code database when operating right is changed, drop
Low user experience.
The present invention provides a solution so that and operating right code database can automatically update when operation button is changed,
Improve user experience.
As shown in Figure 1, the terminal structure schematic diagram for the hardware running environment that Fig. 1, which is the embodiment of the present invention, to be related to.
As shown in Figure 1, the terminal may include:Processor 1001, such as CPU, network interface 1004, user interface
1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components.
User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface
1003 can also include standard wireline interface and wireless interface.Network interface 1004 may include optionally that the wired of standard connects
Mouth, wireless interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory, can also be stable memory
(non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor
1001 storage device.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap
It includes than illustrating more or fewer components, either combines certain components or different components arrangement.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage media
Believe module, the control program of Subscriber Interface Module SIM and system operatio permission.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, is carried out with background server
Data communicate;User interface 1003 is mainly used for connecting client (user terminal), with client into row data communication;And processor
1001 can be used for calling the control program of the system operatio permission stored in memory 1005, and execute following operation:
When receiving accessing page request, the corresponding page of the accessing page request is obtained;
Obtain the attribute of the operation button in the page;
It is updated in operating right code database according to the attribute of the operation button and is encoded accordingly, so that the operating right
Coding in code database is matched with the operation button in the page.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
The attribute of the operation button includes the identification information and authority information of the operation button.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
Obtain the class information of user;
The operating right of the user is obtained according to the class information of the user;
There is the operation button of operating right to carry out on the page the user according to the operating right of the user
Display.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
Whether it is authorized to operate that institute according to user described in the determined property of the operating right of the user and the operation button
State operation button;
When the user is authorized to operate that the operation button, the operation button is shown on the page.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
When receiving the logging request of terminal transmission, whether the username and password for including in the logging request is judged
Correctly;
When the user name and the correct password, System menu is sent to the terminal, so that the terminal is based on
The System menu sends the access request.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
Obtain the data permission configuration information of user;
The data list that the user possesses is obtained according to the data permission configuration information of the user;
The data list is shown on the page.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
Determine the dimension of the data permission configuration information of the user;
Obtain dimension values of the data permission configuration information of the user in the dimension;
The user is obtained every according to the dimension of the data permission configuration information of the user and the dimension values
Possess the data list of permission in a dimension;
The data list that the user is possessed to permission in each dimension takes union, obtains user's ownership
The data list of limit.
Further, processor 1001 can call the control program of the system operatio permission stored in memory 1005,
Also execute following operation:
The dimension of the data permission configuration information of the user includes the department information and project information of the user.
The present invention is according to said program, and when server receives access request, it is corresponding to obtain the accessing page request
The attribute of all operation buttons in the page, then according in the attribute of the operation button got update operating right code database
Corresponding coding, so that the coding in the operating right code database is matched with the operation button in the page, so that
Operating right code database can automatically update when operation button is changed, and improve user experience.
Based on above-mentioned hardware architecture, the embodiment of the control method of present system operating right is proposed.
It is the flow diagram of the control method first embodiment of present system operating right with reference to Fig. 2, Fig. 2, it is described
The control method of system operatio permission includes:
Step S10 obtains the corresponding page of the accessing page request when receiving accessing page request;
The control method of present system operating right is mainly used for the control of system, such as can be used for the control of web system
System.The operating right of system refers to the operating right of all visible operation buttons, when user needs to operate in system,
Logging in system by user is clicked and needs the link of the page accessed in System menu, and server receives after access request according to institute
The page that access request determines user's request is stated, control system program is automatically into the corresponding page of the access request.
Step S20 obtains the attribute of the operation button in the page;
After server determines the page of user's request, obtains user and ask all operation buttons in the page accessed
The attribute of attribute, the operation button includes the identification information and authority information of the operation button, wherein the identification information
For namely operation button identification code, for button to be identified as to the operation button for being associated with operating right, i.e., when button has
When identification information, show that the button is operation button;The permission code of the authority information namely operation button includes the operation
The information of button corresponding operation and the user for having operating right is compared for the operating right with user to judge to be used for
Whether it is authorized to operate that this button, the authority information of operation button are additionally operable to the mutual area that all operation buttons in the same page need
Point, thus in the page all operation buttons authority information it is different.
For example, in the present invention, the identification information of operation button is the mark class attributes of operation button in the page,
Class attributes are set as role_operate_clz, and for the button to be identified as operation button, the even class of button belongs to
Property in include role_operate_clz, then it represents that the button be operation button;Authority information is then the opcode of operation button
Attribute is the unique mark of the operation button, for distinguishing other buttons in the page, therefore the opcode attributes of operation button
Code cannot be repeated in current page.
When receiving accessing page request, after getting the corresponding page of access request, identifies the operation button of the page, obtain
The class attributes and mark opcode attributes of extract operation button.Specifically, in the page all operation buttons attribute
(class attributes and mark opcode attributes) can obtain in accordance with the following methods:When page code database receives the access of user
When request, a js methods request is automatically generated, which includes all of the asked accession page of user<a>
The operation button of label tape permission code, i.e., will make operating right<a>Label includes that class attributes and mark opcode belong to
Property, wherein class attributes are role_operate_clz, and the code of operation button cannot be repeated in current page, by the page
Interior all operation buttons are mutually distinguished.Band class values are included role_operate_clz's by js methods request<a>Label
The request of permission code to program backstage so that program backstage gets the class attributes and mark of all operation buttons of the page
Opcode attributes.
Step S30 is updated in operating right code database according to the attribute of the operation button and is encoded accordingly, so that described
Coding in operating right code database is matched with the operation button in the page;
In system operatio authority control method provided by the invention, when operating right button needs to modify, safeguard
Personnel need to only change the coding of the operation button in the page, that is, change the authority information in the attribute of operation button.Work as server
Get the attribute of above-mentioned page operation button, the attribute of the operation button got in operating right code database with institute
The corresponding operation coding of operation button is stated to be compared one by one, if there are different parts, the volume of operation button in instruction page
Code is modified, then is updated the coding operated in code database according to the attribute for obtaining page operation button, so that behaviour
The coding for making code database is consistent with page operation button encoder, to realize that is encoded in operating right code database automatically updates.
For example, each operation button in the page is each equipped with class attributes and mark opcode attributes, all operations are pressed
The class attributes of button include role_operate_clz, and the code of the opcode attributes of operation button is each in the same page
It differs.When operation button needs modification, maintenance personnel only needs the opcode attributes of manual modification operation button.Program backstage
After receiving the js methods request that the page is sent, according to all operation buttons of the page for including in js methods request
Class attributes be role_operate_clz and mark opcode attributes, by the opcode attributes of the operation button got with
Operation coding corresponding with the operation button is compared one by one in operating right code database, when the two difference, will be operated
It encodes in rights token library and is updated according to the coded data of the opcode attributes of the operation button accordingly, to realize
Coding in operating right code database automatically updates.
The present embodiment is according to said program, when server gets the access request of user, obtains user and asks access
Then the attribute of all operation buttons in the page updates the volume in operating right code database according to the attribute of the operation button
Code improves user experience so that operating right code database can automatically update when operation button is changed.
Further, with reference to Fig. 3, Fig. 3 is that the flow of the second embodiment of present system operating right control method is shown
It is intended to, is based on first embodiment, the access request for obtaining user determines user's request according to the access request
After the step of page, further include:
Step S40 obtains the class information of user;
Step S50 obtains the operating right of the user according to the class information of the user;
The user is had the operation button of operating right in the page by step S60 according to the operating right of the user
It is shown on face.
In the present invention, the operating right of user and the class information of user are corresponding, i.e., according to the class information of user
To judge whether user has the operating right of some operation button.When user needs to operate in system, Yong Hudeng
Recording system is clicked and needs the link of the page accessed in System menu, and server receives the account that login is obtained after access request
The class information for the user for including in family is looked into then according to the class information of the user got from operating right code database
The operating right of user is found out, then according to the operating right of the user, user is asked to have operating right in the page accessed
Operation button shown, operated for user.It is to be appreciated that obtaining user's operation permission and will have operating right
Button the page show and first embodiment in realize can be without first between the automatically updating of operating right code database
Sequence afterwards, i.e. without sequencing between step S20 and step S40.Preferably, step S40 is first carried out after step S30
Operating right code database automatically updates, then obtains user's operation permission and show the button for having operating right in the page.
In current system operatio rights management, after getting the operating right of user, need for every in the page
A method program is separately provided to judge whether the user is authorized to operate that this button in one operation button, very cumbersome.Cause
This, it is preferable that is in technical solution provided in this embodiment, after the operating right for getting the user, by will be described
The code and permission code of operating right and the operation button in user requests webpage carry out recycle ratio pair, to obtain user's request
The operation button that page right of possession accesses, and shown and operated for user, specifically, Fig. 4 is please referred to, i.e., the described step
S60 includes:
The operating right of the user is compared with the attribute of the operation button, judges the user by step S61
Whether the operation button is authorized to operate that;
Step S62 shows the operation button when the user is authorized to operate that the operation button on the page
Show.
In technical solution provided by the invention, each operation button is each equipped with identification information in the page, it is only necessary to will lead to
The operating right for crossing the user that will be got is compared with the permission code of the operation button, you can judges user to the operation
Whether button has operating right, without configuring an operation table for each page.Specifically, each permission in the page
Operation button is each equipped with class attributes and mark opcode attributes, and wherein class is role_operate_clz, and operation is pressed
The code of button cannot be repeated in current page, and all operation buttons in the page are mutually distinguished.It is obtained when according to the information of user
After getting the operating right of user, the operation button in the page is identified by a js methods, obtains the attribute of operation button, and will
The user's operation permission and the attribute of the operation button got compares, if the user is authorized to operate that the button,
The operation button is shown on the page, if family haves no right to operate the button, by the button in the page
It is upper to hide, so complete the comparison of all buttons of the page, by user the page have all operation buttons of operating right into
Row display, to realize the configuration of user's operation permission.
In the present embodiment, the class information of user is obtained, the behaviour of the user is then obtained according to the class information of user
Make permission, and the operation button for having operating right is shown on the page, to realize the configuration of user's operation permission.
It is the flow diagram that present system operating right control method third is implemented with reference to Fig. 5, Fig. 5, is based on first
And second embodiment, the access request for obtaining user determine the page of user's request according to the access request
Before step, further include:
Step S70, when receive terminal transmission logging request when, judge the user name for including in the logging request and
Whether password is correct;
Step S80 sends System menu, for described when the user name and the correct password to the terminal
Terminal is based on the System menu and sends the access request.
When user needs access system, it is necessary first to which the identity information for verifying user needs user in system login at this time
The page inputs username and password and is logged in respectively, after server obtains username and password input by user, by its with it is pre-
The username and password deposited is compared, when at least one of described username and password input by user and the use to prestore
When name in an account book and inconsistent password, judges the user name input by user or/and password bad, then prompt user to be inputted
User name or password mistake, need to re-enter username and password.
When the username and password input by user is consistent with the username and password to prestore, the use is judged
The username and password of family input is correct, and user logins successfully, and server sends System menu to terminal, and terminal display interface is jumped
System menu is gone to, user, which clicks System menu, can ask accession page.
In the present embodiment, when user needs access system, first determine whether username and password input by user whether just
Really, the access request that user is just obtained when username and password input by user is correct, ensure that the safety of system.
It is the flow diagram that present system operating right control method the 4th is implemented with reference to Fig. 6, Fig. 6, is based on first
To 3rd embodiment, it is described obtain user access request, according to the access request determine user request the page the step of
Later, further include:
Step S90 obtains the data permission configuration information of user;
Step S100 obtains the data list that the user possesses according to the data permission configuration information of the user;
Step S110 shows the data list on the page.
The permission of system further includes data permission other than operating right, and the operating right controls user to the page
In operation button whether be authorized to operate that the data permission controls user to which data Internet access in the page.
Work as logging in system by user, after the username and password verification inputted is correct, system jumps to operation interface, clicks
The link of the page accessed is needed in System menu, described in server is received after access request and to be determined according to the access request
The page of user's request, control system program press the operating right of user automatically into the corresponding page of the access request
While configuration according to the method in embodiment 1 to 3, also need to configure the data permission of user, it is complete to realize
System permission control.After system program is asked automatically into the visit page asks the corresponding page, server acquisition is stepped on
Then the data permission configuration information for the user for including in the account of record is weighed according to the data permission configuration information of user from data
The data list that user possesses is obtained in limit library, and it is shown on the page, so that when user to access pages both
Show user have permission to access operation button, and show user's Internet access data, while realize system operatio permission and
The control of data permission.It is understood that realizing operating right database update, operating right configuration and data permission control
The step of have no sequencing, i.e. without sequencing between step S20, step S40 and step S90 three.
In the present invention, in order to realize the various dimensions control of data permission, various dimensions can be carried out to the data permission of user and matched
It sets, when obtaining when the data permission configuration information of user, obtains the dimension of the data permission configuration information of user, further obtain
Take the data list that family possesses permission in the dimension.Specifically, include with reference to Fig. 7, i.e., the described step S100:
Step S101 determines the dimension of the data permission configuration information of the user;
Step S102 obtains dimension values of the data permission configuration information of the user in the dimension;
Step S103, according to the dimension of the data permission configuration information of the user and dimension values acquisition
User possesses the data list of permission in each dimension;
Step S104, the data list that the user is possessed to permission in each dimension take union, obtain described
User possesses the data list of permission.
In current system data permission control, authority configuration, i.e. user are usually carried out according to user department
After login, system obtains the department information of this user, and the data of other departments are filtered according to its department information, only shows user
The data of department reach data permission control effect.Data permission control method single effect so, can only be from department
This dimension is controlled.In order to be configured from multiple dimensions to the operating right of user, in the present invention, user
Data permission configuration information can to have multiple dimensions, the data permission configuration information of the dimension be the attribute of user, often
A dimension all corresponds to respective permission group, it is to be understood that the dimension of data permission configuration information can according to actual needs into
Row setting, is not particularly limited herein.For instance, it is preferred that the data permission configuration information of user may include the department of user
Two dimensions of information and project information.Further, the data permission configuration information of each dimension can include different dimension
Angle value, the dimension values can voluntarily be arranged according to actual conditions, are not particularly limited herein.For example, department information may include
Hardware department, software division, administrative department etc., project information may include that project one, project two, project are third, it is to be understood that
It is that the type of project can be voluntarily arranged according to actual needs in the type and project information of department in department information,
This is not particularly limited.The different dimensional angle value of the data permission configuration information of each dimension of user corresponds to respective authority set,
I.e. different departments have respective data permission collection, different projects also to have respective data permission collection.
When getting the access request of user, the dimension of the data permission configuration information of user is judged, then obtain and use
Dimension values of the family in each dimension obtain user in each dimension further according to the dimension values of dimension and user in the dimension
Data permission collection of the user got in each dimension is taken union to be gathered around to get to user by the data permission collection possessed
Some data permission collection, the data permission collection possessed according to user can be obtained the data list of user's Internet access.
For example, when getting the access request of user, server judges to obtain active user in portion according to user information
Possess data permission in door and two dimensions of project, then obtains department's list that active user possesses permission, each department is equal
It is associated with addressable data, you can the department's list association possessed according to user inquires data list, obtains user in portion
The data list (namely division data authority set) possessed in door dimension;The project row that active user possesses permission are obtained simultaneously
Table, each project are associated with addressable data, you can and the bulleted list correlation inquiry possessed according to user goes out data list,
Obtain the data list (namely project data authority set) that user possesses in project dimension;User is possessed in department's dimension
Data list and project dimension on the data list that possesses merge/take union (i.e. by the division data authority set and item of user
Mesh number takes union according to authority set) the data permission list (i.e. the data permission collection of user) that user possesses is obtained, by the user
Terminal where the data permission list possessed is transmitted to user is shown on the page, to realize department and the project from user
The data permission of user is controlled in two dimensions.
Technical solution provided by the embodiment gets user and asks the page accessed in the access request for getting user
When, the data permission configuration information of user is obtained, the Internet access of user is got according to the data permission configuration information of user
Data list, and shown on the page, so as to realize the data permission control of system.
In addition, the embodiment of the present invention also proposes a kind of storage medium, system operatio permission is stored on the storage medium
Control program, the control program of the system operatio permission realized when being executed by processor the system described in embodiment as above grasp
The step of making the control method of permission.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that process, method, article or system including a series of elements include not only those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this
There is also other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art
Going out the part of contribution can be expressed in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone,
Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.