CN111783050A - Role and authority control system of website user - Google Patents

Role and authority control system of website user Download PDF

Info

Publication number
CN111783050A
CN111783050A CN202010624608.7A CN202010624608A CN111783050A CN 111783050 A CN111783050 A CN 111783050A CN 202010624608 A CN202010624608 A CN 202010624608A CN 111783050 A CN111783050 A CN 111783050A
Authority
CN
China
Prior art keywords
user
module
role
authority
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010624608.7A
Other languages
Chinese (zh)
Inventor
马少博
刘津
马浩严
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202010624608.7A priority Critical patent/CN111783050A/en
Publication of CN111783050A publication Critical patent/CN111783050A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/105Multiple levels of security

Abstract

The invention relates to the technical field of software development, and particularly provides a role and authority control system of a website user, which is applied to a webpage end and comprises a webpage directory module, a user module, a role module, a login module and a cache module; the webpage directory module is used for viewing each page, taking each page as a right, and storing the code and the name of the page into a directory right table; the user module manages all users in the website; the role module manages all roles in the website; the login module is used for verifying the account password of the user, sending and sending an AJAX asynchronous request to the back end by the front end to acquire login authorization of the server, and then returning the authority of the user by the server; and after the user successfully logs in the cache module and acquires the authority list, storing the authority list into a localStorage of the browser. Compared with the prior art, the invention has the advantages of good expandability, better maintenance and updating, reduced cost and increased operation speed.

Description

Role and authority control system of website user
Technical Field
The invention relates to the technical field of software development, and particularly provides a role and authority control system for a website user.
Background
Nowadays, network users often need to log in different websites, and different users need to display different pages according to business requirements of a website system, so that users with different identities, such as administrators, members, common users and the like, are designed in most of the website systems at present. The range of operations and page access rights that each type of user can perform in the network are different. In the current mainstream website design, the identity authority of a certain type of user is generally determined by self, and if the authority of a certain type of user needs to be changed, the published website system needs to be updated again, so that the method has more defects:
1. the user identities can only be fixed, and the expandability is poor;
2. the role of a certain user cannot be updated or maintained in time;
3. the operation and maintenance cost is increased, and the use and maintenance of the website are not facilitated;
4. when a user jumps a page, the user can jump successfully only after requesting and obtaining permission from the server, which consumes the performance of the server and increases the waiting time of the user.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a role and authority control system of a website user, which has reasonable design and is safe and applicable.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a role and authority control system of a website user is applied to a webpage end and comprises a webpage directory module, a user module, a role module, a login module and a cache module;
the webpage directory module is used for viewing each page, taking each page as a right, and storing the code and the name of the page into a directory right table;
the user module is used for managing all users in the website;
the role module is used for managing all roles in the website;
the login module is used for verifying the account password of the user, sending and sending an AJAX asynchronous request to the back end by the front end to acquire login authorization of the server, and then returning the authority of the user by the server;
the cache module is used for storing the authority list into localStorage of the browser after the user successfully logs in and acquires the authority list.
Furthermore, the administrator in the user module checks the list of all users, and can perform the operations of adding, deleting, modifying and checking on the users.
Furthermore, after an administrator in the user module selects a certain user, one or more roles are selected in the role list and then stored in the user, the database creates a user role relationship table, the corresponding relationship between the user and the roles is stored in the user role relationship table, and all the permissions owned by any user can be inquired according to the role permission mapping relationship in the last step.
Furthermore, an administrator checks all role lists in the role module, the role represents a class of identity users with the same authority, and the role module can perform addition, deletion, modification and check operations on the roles and maintain the role lists.
Furthermore, in the role module, after an administrator selects a certain role, a specific authority is selected from a right authority list of a webpage for storage, and the authorities are stored in the role;
and creating a role authority mapping relation table, and storing the corresponding relation between the role and the authority in the table.
Further, the login module checks according to an account password provided by a user, whether the user meets the login requirement is inquired in a database, all roles owned by the user are inquired in a user role relation table of the database after the user identity authentication is successful, all permissions owned by the user are inquired from a role permission database table according to all the roles of the user, and all the permissions of the current user at the browser end are returned after the permissions are inquired successfully.
Furthermore, the front end in the login module constructs different webpage directories according to the returned user authority and displays the webpage directories to the user, the user can only access the currently displayed webpage directories, and other pages cannot be accessed.
Furthermore, the user logs in the system again in the cache module, after the authority information of the user is inquired from the server, the previous authority information list cached by the browser is read from the localStorage, and then the comparison is carried out on the previous authority information list and the latest authority list;
if the two are the same, no processing is performed, and if the two are different or are not cached before, the latest permission list is saved in the browser localStorage.
Compared with the prior art, the role and authority control system of the website user has the following outstanding beneficial effects:
(1) the administrator can control the roles and the authorities of the users in real time, can set the roles for the individual users or the batch users, and is flexible and convenient to operate.
(2) After a user of a website user logs in, due to the fact that the authority is cached locally, when a follow-up webpage skips, the user does not need to wait for a server to allow related pages to be carried out, whether the user can enter the webpage or not can be directly judged at the front end, the pressure of the server is relieved, loading time is prolonged, and therefore the user can have better use experience.
(3) The authority can be updated when the user logs in each time, and the authority can be updated in the using process of the user according to the service requirement, so that different interfaces can be displayed according to different requirements, and the access efficiency of the system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of role rights management in a role and rights control system for a website user;
FIG. 2 is a flow chart of a user usage system in a role and privilege control system for users of a website.
Detailed Description
The present invention will be described in further detail with reference to specific embodiments in order to better understand the technical solutions of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A preferred embodiment is given below:
as shown in fig. 1 and 2, the role and authority control system of a website user of the present invention is applied to a web page end, and includes a web page directory module, a user module, a role module, a login module, and a cache module; the webpage directory module is used for viewing each page, taking each page as a right, and storing the code and the name of the page into a directory right table. The user module is used for managing all users in the website. The role module is used for managing all roles in the website. The login module is used for verifying the account password of the user, sending and sending an AJAX asynchronous request to the back end by the front end, acquiring login authorization of the server, and then returning the authority of the user by the server. The cache module is used for storing the authority list into a localStorage of the browser after the user successfully logs in and acquires the authority list.
The webpage directory module:
when a website system is constructed, each page in the webpage is viewed, each page is taken as a right, and the code number and the name of the page are stored in a directory right table. Thus, the directory authority table stores the information of all pages for use by other modules in the future.
A user module:
after logging in the system, the administrator enters the user module and can manage all users in the website.
And the administrator checks the list of all the users and performs the operations of adding, deleting, modifying and checking on the users. After the administrator selects a user, one or more roles are selected from the role list and then saved to the user. The database creates a user role relationship table, and the corresponding relationship between the user and the role is stored in the table. And then according to the role authority mapping relation table in the last step, all the authorities owned by a certain user can be inquired.
A role module:
after logging in the system, the administrator enters the role module to manage all roles in the website.
The administrator checks all role lists, the roles represent identity users with the same authority, and the administrator can perform adding, deleting, modifying and checking operations on the roles and maintain the role lists.
After the administrator selects a certain role, the administrator checks specific authorities from the right authority list of the webpage, then saves the authorities to the role. And creating a role authority mapping relation table, and storing the corresponding relation between the role and the authority in the table. Therefore, in the subsequent use process, the authority information owned by the role can be inquired.
A login module:
and the ordinary user of the website logs in the website system through the login module. In the process, the login module verifies the account number and the password of the user, the front end sends an AJAX asynchronous request to the back end to obtain login authorization of the server, and then the server returns the authority of the user.
Checking according to the account number and the password provided by the user, inquiring whether the user meets the login requirement in the database, inquiring all roles owned by the user in the role relation table of the database user after the user identity authentication is successful, and inquiring all the permissions owned by the user from the role permission database table. And returning all the permissions of the current user to the browser end after the permissions are successfully queried.
And returning all the permissions of the current user to the browser end after the permissions are successfully queried. And the front end constructs different webpage directories and displays the users according to the returned user authority, the users can only access in the currently displayed webpage directories, and other pages cannot be accessed.
A cache module:
and after the user successfully logs in the login module and acquires the authority list, storing the authority list into a localStorage of the browser. When a user jumps to a page in the process of using a website system, the user first reads a cached authority list from a localStorage and then checks whether the user has the right to access the page. If yes, jumping to the next page successfully, and if not, prompting the user to have no authority at the front end.
Compared with some existing systems, before the user jumps to the webpage each time, the authentication request is firstly carried out on the back end, and then whether the webpage can be jumped or not is judged. Firstly, the time of the back-end request is saved, secondly, the pressure of the server is relieved, and the server resources can be better distributed to other places.
The user logs in the system again, after the authority information of the user is inquired from the server, firstly, an authority information list cached by a browser before is read from the localStorage, and then, the authority information list is compared with the latest authority list;
if the two are the same, no processing is performed, and if the two are different or are not cached before, the latest permission list is saved in the browser localStorage.
Under the authority design system, users in a large-scale website system can flexibly distribute the authority, and website operation and maintenance personnel can better manage the website.
The above embodiments are only specific ones of the present invention, and the scope of the present invention includes but is not limited to the above embodiments, and any appropriate changes or substitutions according to the role and authority control system claims of a website user and those of ordinary skill in the art should fall within the scope of the present invention.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (8)

1. A role and authority control system of a website user is characterized in that the system is applied to a webpage end and comprises a webpage directory module, a user module, a role module, a login module and a cache module;
the webpage directory module is used for viewing each page, taking each page as a right, and storing the code and the name of the page into a directory right table;
the user module is used for managing all users in the website;
the role module is used for managing all roles in the website;
the login module is used for verifying the account password of the user, sending and sending an AJAX asynchronous request to the back end by the front end to acquire login authorization of the server, and then returning the authority of the user by the server;
the cache module is used for storing the authority list into localStorage of the browser after the user successfully logs in and acquires the authority list.
2. The system of claim 1, wherein an administrator in the user module views a list of all users and can perform operations of adding, deleting, modifying and checking on the users.
3. The system of claim 1 or 2, wherein after an administrator in the user module selects a user, one or more roles are selected from the role list and then saved in the user, the database creates a user role relationship table, the corresponding relationship between the user and the roles is stored in the user role relationship table, and then all the permissions owned by any user can be queried according to the role permission mapping relationship in the previous step.
4. The system of claim 3, wherein the role module is configured to allow an administrator to view all role lists representing a class of users with the same authority, and to perform operations of adding, deleting, modifying and checking roles to maintain the role lists.
5. The system of claim 4, wherein in the role module, after an administrator selects a certain role, the administrator checks a specific right from the right-side right list of the web page for storage, and stores the rights in the role;
and creating a role authority mapping relation table, and storing the corresponding relation between the role and the authority in the table.
6. The system of claim 5, wherein the login module checks the account password provided by the user, and queries whether the user meets the login requirement in the database, after the user identity is successfully verified, all roles owned by the user are queried in the database user role relationship table, all permissions owned by the user are queried from the role permission database table according to all roles of the user, and after the permissions are successfully queried, all permissions of the current user are returned to the browser.
7. The system of claim 6, wherein the front end of the login module constructs different web page directories according to the returned user rights and displays the web page directories to the user, and the user can only access the currently displayed web page directories, and other pages cannot be accessed.
8. The system of claim 7, wherein the user logs in the system again in the cache module, and after querying the user's authority information from the server, first reads the previous browser-cached authority information list from the localStorage, and then compares the previous browser-cached authority information list with the latest authority list;
if the two are the same, no processing is performed, and if the two are different or are not cached before, the latest permission list is saved in the browser localStorage.
CN202010624608.7A 2020-07-02 2020-07-02 Role and authority control system of website user Pending CN111783050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010624608.7A CN111783050A (en) 2020-07-02 2020-07-02 Role and authority control system of website user

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010624608.7A CN111783050A (en) 2020-07-02 2020-07-02 Role and authority control system of website user

Publications (1)

Publication Number Publication Date
CN111783050A true CN111783050A (en) 2020-10-16

Family

ID=72757802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010624608.7A Pending CN111783050A (en) 2020-07-02 2020-07-02 Role and authority control system of website user

Country Status (1)

Country Link
CN (1) CN111783050A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112615872A (en) * 2020-12-22 2021-04-06 广州技象科技有限公司 Internet of things node security management method, device, equipment and storage medium
CN113656724A (en) * 2021-10-20 2021-11-16 深圳市信润富联数字科技有限公司 Method and system for dynamically configuring webpage function based on web page
CN114070645A (en) * 2021-11-29 2022-02-18 上海汇付数据服务有限公司 Website page access authority management method and system
CN115481386A (en) * 2022-09-15 2022-12-16 中航信移动科技有限公司 Batch configuration system for target application use permission

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6453353B1 (en) * 1998-07-10 2002-09-17 Entrust, Inc. Role-based navigation of information resources
CN101902402A (en) * 2010-07-21 2010-12-01 中兴通讯股份有限公司 Method for managing user right and device thereof
CN102930226A (en) * 2012-10-25 2013-02-13 无锡中科泛在信息技术研发中心有限公司 Method for controlling use permission of fine-grained client
CN104363211A (en) * 2014-10-31 2015-02-18 北京思特奇信息技术股份有限公司 Method and system for managing authority
CN107277038A (en) * 2017-07-18 2017-10-20 北京微影时代科技有限公司 Access control method, device and system
CN108965280A (en) * 2018-07-05 2018-12-07 郑州云海信息技术有限公司 A kind of user right restriction method
CN109388922A (en) * 2017-08-04 2019-02-26 镇江雅迅软件有限责任公司 A kind of user management based on RBAC model and a key log in realizing method
CN109413098A (en) * 2018-12-04 2019-03-01 北京达佳互联信息技术有限公司 Method, apparatus, terminal and the storage medium that web page element is shown
CN109688120A (en) * 2018-12-14 2019-04-26 浙江大学 Based on the dynamic permission management system for improving RBAC model and Spring Security frame
CN110443010A (en) * 2019-07-22 2019-11-12 安徽智恒信科技股份有限公司 One kind permission visual configuration control method, device, terminal and storage medium in information system
CN110442326A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 A kind of method and its system simplifying separation permission control in front and back end based on Vue
CN110457891A (en) * 2019-07-22 2019-11-15 安徽智恒信科技股份有限公司 A kind of authority configuration interface display method, device, terminal and storage medium
CN110535774A (en) * 2019-07-24 2019-12-03 平安科技(深圳)有限公司 Dynamic routing processing method, device, computer equipment and storage medium
CN110968825A (en) * 2019-11-30 2020-04-07 信联科技(南京)有限公司 WEB page fine-grained authority control method

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6453353B1 (en) * 1998-07-10 2002-09-17 Entrust, Inc. Role-based navigation of information resources
CN101902402A (en) * 2010-07-21 2010-12-01 中兴通讯股份有限公司 Method for managing user right and device thereof
CN102930226A (en) * 2012-10-25 2013-02-13 无锡中科泛在信息技术研发中心有限公司 Method for controlling use permission of fine-grained client
CN104363211A (en) * 2014-10-31 2015-02-18 北京思特奇信息技术股份有限公司 Method and system for managing authority
CN107277038A (en) * 2017-07-18 2017-10-20 北京微影时代科技有限公司 Access control method, device and system
CN109388922A (en) * 2017-08-04 2019-02-26 镇江雅迅软件有限责任公司 A kind of user management based on RBAC model and a key log in realizing method
CN108965280A (en) * 2018-07-05 2018-12-07 郑州云海信息技术有限公司 A kind of user right restriction method
CN109413098A (en) * 2018-12-04 2019-03-01 北京达佳互联信息技术有限公司 Method, apparatus, terminal and the storage medium that web page element is shown
CN109688120A (en) * 2018-12-14 2019-04-26 浙江大学 Based on the dynamic permission management system for improving RBAC model and Spring Security frame
CN110443010A (en) * 2019-07-22 2019-11-12 安徽智恒信科技股份有限公司 One kind permission visual configuration control method, device, terminal and storage medium in information system
CN110457891A (en) * 2019-07-22 2019-11-15 安徽智恒信科技股份有限公司 A kind of authority configuration interface display method, device, terminal and storage medium
CN110535774A (en) * 2019-07-24 2019-12-03 平安科技(深圳)有限公司 Dynamic routing processing method, device, computer equipment and storage medium
CN110442326A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 A kind of method and its system simplifying separation permission control in front and back end based on Vue
CN110968825A (en) * 2019-11-30 2020-04-07 信联科技(南京)有限公司 WEB page fine-grained authority control method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112615872A (en) * 2020-12-22 2021-04-06 广州技象科技有限公司 Internet of things node security management method, device, equipment and storage medium
CN112615872B (en) * 2020-12-22 2022-02-22 广州技象科技有限公司 Internet of things node security management method, device, equipment and storage medium
CN113656724A (en) * 2021-10-20 2021-11-16 深圳市信润富联数字科技有限公司 Method and system for dynamically configuring webpage function based on web page
CN113656724B (en) * 2021-10-20 2022-02-15 深圳市信润富联数字科技有限公司 Method and system for dynamically configuring webpage function based on web page
CN114070645A (en) * 2021-11-29 2022-02-18 上海汇付数据服务有限公司 Website page access authority management method and system
CN115481386A (en) * 2022-09-15 2022-12-16 中航信移动科技有限公司 Batch configuration system for target application use permission

Similar Documents

Publication Publication Date Title
CN111783050A (en) Role and authority control system of website user
US8850550B2 (en) Using cached security tokens in an online service
US8745088B2 (en) System and method of performing risk analysis using a portal
US9805209B2 (en) Systems and methodologies for managing document access permissions
CN108289098B (en) Authority management method and device of distributed file system, server and medium
US20030101200A1 (en) Distributed file sharing system and a file access control method of efficiently searching for access rights
US10275347B2 (en) System, method and computer program product for managing caches
CN104160381A (en) Managing tenant-specific data sets in a multi-tenant environment
CN103067463A (en) Centralized management system and centralized management method for user root permission
EA007778B1 (en) Application generator
CN113271311B (en) Digital identity management method and system in cross-link network
CN109587233A (en) Cloudy Container Management method, equipment and computer readable storage medium
US10650153B2 (en) Electronic document access validation
CN112511316B (en) Single sign-on access method and device, computer equipment and readable storage medium
CN108614882A (en) A kind of file management method and system based on server
US20100036892A1 (en) Determination of an updated data source from disparate data sources
CN112905978B (en) Authority management method and device
US20210021416A1 (en) Systems and methods for using automated browsing to recover secured key from a single data entry
US11522863B2 (en) Method and system for managing resource access permissions within a computing environment
CN113127906A (en) Unified authority management platform, method and storage medium based on C/S architecture
CN113468579A (en) Data access method, device, equipment and storage medium
CN103701844A (en) User information management method and system
CN112800066A (en) Index management method, related device and storage medium
CN114070847A (en) Current limiting method, device, equipment and storage medium of server
CN116305218B (en) Data link tracking and data updating method, device and data management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201016

RJ01 Rejection of invention patent application after publication