Authority management method and device and computer readable storage medium

By introducing the permission system of users, positions, resource groups, and interfaces into the RBAC model, interface-level permission control is achieved, which solves the problem of insufficient security and flexibility in traditional permission management and control, and improves permission matching efficiency and security.

CN118862044AActive Publication Date: 2024-10-29CHINA MERCHANTS BANK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410894084.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-29
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

The traditional RBAC model lacks security and flexibility in permission control. Permission control is mainly at the menu button level and cannot go to the interface level, resulting in insufficient security and poor flexibility.

Method used

By introducing a permission system of users, positions, resource groups, and interfaces, with resource groups as the core, permissions are controlled at the interface level, and fine-grained permission control is achieved at the front and back ends, an interface permission tree is constructed, and interface access requests are matched based on user permission information. Execute the corresponding business logic.

Benefits of technology

It improves the security and flexibility of permission management and control, realizes interface-level permission control, and enhances permission matching efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862044A_ABST
    Figure CN118862044A_ABST
Patent Text Reader

Abstract

The invention discloses an authority management method and device and a computer readable storage medium, and the method comprises the steps: determining a target resource group corresponding to the post information of a current user in a resource group based on a first association relationship among a user, a post, the resource group and an interface; determining a to-be-rendered menu and a to-be-rendered button corresponding to the current user based on the target resource group; performing rendering operation on a menu to be rendered and a button to be rendered based on the target resource group to obtain a front-end operation interface; and sending the front-end operation interface to a front-end terminal corresponding to the current user so as to display the front-end operation interface on the front-end terminal. According to the method, a permission system of'users, posts, resource groups and interfaces' is introduced, the resource groups are taken as the core, the permission is controlled at the interface level for front-end and back-end permission control, and the security and flexibility of permission control are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a permission management method, device and computer-readable storage medium. Background Art

[0002] Traditional RBAC (Role-Based Access Control) permission management, by defining the permissions of roles and granting a role to a user to control the user's operation permissions and data permissions, achieves the logical separation of users and permissions, greatly facilitating the management of permissions. In the RBAC model, there is a many-to-many relationship between users and roles, and there is also a many-to-many relationship between roles and permissions. Permissions generally include page permissions (whether users can see related pages, menus, and buttons) and operation permissions (whether users can operate related buttons). In order to maximize the user experience, page permissions and operation permissions are generally consistent, that is, users can "see and operate".

[0003] However, in the permission control of the RBAC model, permissions are generally controlled at the menu button level, not at the interface level, which lacks security. Alternatively, permissions are controlled at the interface level by directly associating roles with interfaces, which lacks flexibility.

[0004] Therefore, how to improve the security and flexibility of permission management in the RBAC model is a problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of this application is to provide a permission management method, device and computer-readable storage medium, aiming to solve the technical problem of how to improve the security and flexibility of permission management of the RBAC model.

[0006] To achieve the above purpose, the present application provides a rights management method, which includes the following steps:

[0007] Based on the first association relationship among the user, the position, the resource group, and the interface, determine the target resource group corresponding to the position information of the current user in the resource group, wherein the resource group includes at least four permissions: public, logged-in user, member user, and designated position;

[0008] Based on the target resource group, determine the menu to be rendered and the button to be rendered corresponding to the current user;

[0009] Perform rendering operations on the menu to be rendered and the button to be rendered based on the target resource group to obtain a front-end operation interface;

[0010] The front-end operation interface is sent to the front-end terminal corresponding to the current user, so as to display the front-end operation interface on the front-end terminal.

[0011] Furthermore, the step of determining the menu to be rendered and the button to be rendered corresponding to the current user based on the target resource group includes:

[0012] Get the second association relationship between the menu, submenu, resource group, and interface;

[0013] Based on the second association relationship and the target resource group, a menu to be rendered and a button to be rendered corresponding to the current user are determined.

[0014] Furthermore, the rights management method further includes:

[0015] Based on the first association relationship, obtaining permission information corresponding to each interface;

[0016] Based on the permission information corresponding to each interface, an interface permission tree is constructed, wherein the non-leaf nodes of the interface permission tree are the access paths and access methods of the interfaces, and the leaf nodes store the access rights of the interfaces.

[0017] Furthermore, after the step of constructing an interface permission tree based on the permission information corresponding to each interface, the permission management method further includes:

[0018] In response to an interface access request sent by the front-end terminal based on the front-end operation interface, querying permission information corresponding to the interface access request based on the interface permission tree;

[0019] Obtaining user authority information corresponding to the interface access request;

[0020] Determining whether the user authority information matches the authority information corresponding to the interface access request;

[0021] If the user authority information matches the authority information corresponding to the interface access request, the business logic corresponding to the interface access request is executed.

[0022] Furthermore, the rights management method further includes:

[0023] A resource configuration request is detected and the resource configuration interface is displayed;

[0024] A permission change request triggered by the resource configuration interface is detected, a permission change SQL corresponding to the permission change request is obtained, and the permission change SQL is executed.

[0025] Furthermore, the step of obtaining the permission change SQL corresponding to the permission change request and executing the permission change SQL includes:

[0026] Obtaining permission change information and project name corresponding to the permission change request;

[0027] Determine the permission change SQL based on the permission change information, and execute the permission change SQL;

[0028] The permission change sql, the execution order corresponding to the permission change sql and the project name are recorded in the current database.

[0029] Further, the step of determining the permission change SQL based on the permission change information includes:

[0030] Determine the difference information between the permission change information and the permission information corresponding to the project name in the current database;

[0031] The permission change SQL is generated based on the difference information.

[0032] Furthermore, after the step of recording the permission change SQL, the execution order corresponding to the permission change SQL and the user information in the current database, the permission management method further includes:

[0033] Detecting a permission change instruction to publish the permission change SQL to the next environment, obtaining the record information of the permission change in the current database and the name of the project to be published corresponding to the permission change instruction;

[0034] Query the permission change sql to be published corresponding to the name of the project to be published in the permission change sql of the record information;

[0035] The execution order corresponding to the permission change sql to be published is obtained from the record information, and the permission change sql to be published is executed in the database of the next environment based on the execution order.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a permission management device, which includes: a memory, a processor, and a permission management program stored in the memory and executable on the processor, and the permission management program implements the steps of the aforementioned permission management method when executed by the processor.

[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a rights management program is stored, and when the rights management program is executed by a processor, the steps of the aforementioned rights management method are implemented.

[0038] The present application determines the target resource group corresponding to the position information of the current user in the resource group based on the first association relationship between the user, the position, the resource group and the interface, wherein the resource group includes at least four permissions: public, logged-in user, member user and designated position; then, based on the target resource group, determines the menu to be rendered and the button to be rendered corresponding to the current user; then, based on the target resource group, the menu to be rendered and the button to be rendered are rendered to obtain a front-end operation interface; then, the front-end operation interface is sent to the front-end terminal corresponding to the current user to display the front-end operation interface on the front-end terminal. By introducing the permission system of "user, position, resource group and interface", the permission control is performed on the front-end and back-end at the interface level with the resource group as the core, thereby improving the security and flexibility of permission management and control. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 A flowchart of the first embodiment of the method for managing application rights is provided;

[0042] Figure 2 This is a schematic diagram of the permission system in an embodiment of the permission management method of this application;

[0043] Figure 3 This is a schematic diagram of an interface permission tree in an embodiment of the permission management method of this application;

[0044] Figure 4 This is a schematic diagram of the module structure of the rights management device according to an embodiment of the present application.

[0045] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0048] The main solution of the present application is: based on the first association relationship between users, positions, resource groups, and interfaces, determine the target resource group corresponding to the current user's position information in the resource group, wherein the resource group includes at least four permissions: public, logged-in user, member user, and designated position; based on the target resource group, determine the menu to be rendered and the button to be rendered corresponding to the current user; based on the target resource group, render the menu to be rendered and the button to be rendered to obtain a front-end operation interface; send the front-end operation interface to the front-end terminal corresponding to the current user to display the front-end operation interface on the front-end terminal.

[0049] At present, the traditional RBAC (Role-Based Access Control) permission management, by defining the permissions of roles and granting a certain role to users to control the user's operation permissions & data permissions, realizes the logical separation of users and permissions, and greatly facilitates the management of permissions. In the RBAC model, users and roles are in a many-to-many relationship, and roles and permissions are also in a many-to-many relationship. Permissions generally include page permissions (whether users can see related pages, menus and buttons) and operation permissions (whether users can operate related buttons). In order to maximize the user experience, page permissions and operation permissions are generally consistent, that is, users can "see and operate". However, in the permission control of the RBAC model, permissions are generally controlled at the menu button level, not at the interface level, lacking security, or permissions are controlled at the interface level by directly associating roles and interfaces, lacking flexibility. Therefore, how to improve the security and flexibility of permission control in the RBAC model is a problem that needs to be solved urgently.

[0050] This application introduces the permission system of "user, position, resource group, interface" and "menu, resource group", and uses resource group as the core to control the permission of the front-end and back-end at the interface level, thereby improving the security and flexibility of permission management.

[0051] It should be noted that the execution subject of this embodiment may be a rights management device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a rights management device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the rights management device as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0052] Based on this, this application proposes a first embodiment of the rights management method, please refer to Figure 1 , the permission management method includes steps S110 to S140:

[0053] Step S110, based on the first association relationship between the user, the position, the resource group, and the interface, determine the target resource group corresponding to the position information of the current user in the resource group, wherein the resource group includes at least four permissions: public, logged-in user, member user, and specified position;

[0054] In this embodiment, please refer to Figure 2 , pre-set two associations: "user-position-resource group-interface" and "menu-submenu-resource group-interface". "User-position-resource group-interface" is the first association, and "menu-submenu-resource group-interface" is the second association. A user can be associated with multiple positions, a position can be associated with multiple resource groups, and a resource group can be associated with multiple interfaces; a menu can be associated with multiple submenus, and a submenu can be associated with multiple resource groups; a resource group is a resource collection for a certain atomic operation, such as button permissions, page permissions, etc. This makes the resource group the core of permission control, and both the front and back ends perform fine-grained permission control based on resource groups. A resource group includes at least four permissions: public, logged-in user, member user, and specified position. At the same time, the resource group can also specify whether it is open to members or users.

[0055] In this embodiment, when the current user logs in to the corresponding user account at the front-end terminal, the login information corresponding to the user account of the current user is received, and the background server determines the target resource group corresponding to the current user's position information in the resource group based on the first association relationship between the user, the position, the resource group, and the interface. Specifically, the background server queries the position owned by the current user in the first association relationship based on the user account, and queries the resource group to which the current user has authority in the first association relationship based on the position owned by the current user, to obtain the target resource group, that is, the target resource group is the resource group to which the current user has authority among all resource groups.

[0056] Step S120, based on the target resource group, determining the menu to be rendered and the button to be rendered corresponding to the current user;

[0057] In this embodiment, after obtaining the target resource group, the background server determines the menu to be rendered and the button to be rendered corresponding to the current user based on the target resource group. Specifically, in a feasible implementation, step S120 may include steps S1201 to S1202:

[0058] Step S1201, obtaining a second association relationship between a menu, a submenu, a resource group, and an interface;

[0059] Step S1202: Based on the second association relationship and the target resource group, determine the menu to be rendered and the button to be rendered corresponding to the current user.

[0060] In this embodiment, after obtaining the target resource group, the background server ( Figure 2 The backend in the process obtains the second association relationship between the menu, submenu, resource group, and interface, that is, obtains the association relationship corresponding to "menu-submenu-resource group-interface". Then, the backend server determines the menu to be rendered and the button to be rendered corresponding to the current user based on the second association relationship and the target resource group. Specifically, according to the second association relationship, the menus, submenus, and buttons corresponding to the target resource group are searched for the menus and buttons that the current user has the authority to render, and the menus and buttons to be rendered are obtained, and then the target resource group is associated with the menus, submenus, and buttons on the front end.

[0061] Step S130, rendering the menu to be rendered and the button to be rendered based on the target resource group to obtain a front-end operation interface;

[0062] In this embodiment, after obtaining the menu to be rendered and the button to be rendered, the background server performs rendering operations on the menu to be rendered and the button to be rendered based on the target resource group, obtains the front-end operation interface, and renders the menu to be rendered and the button to be rendered specifically according to the target resource group and the association relationship between the target resource group and the front-end elements.

[0063] Step S140: sending the front-end operation interface to the front-end terminal corresponding to the current user, so as to display the front-end operation interface on the front-end terminal.

[0064] In this embodiment, after the front-end operation interface is obtained, the front-end operation interface is sent to the front-end terminal corresponding to the current user ( Figure 2 The front-end terminal displays the front-end operation interface, thereby realizing that the front-end operation interface is visible and operable, and realizing the authority control of the front-end.

[0065] The permission management method proposed in this embodiment determines the target resource group corresponding to the position information of the current user in the resource group based on the first association relationship between the user, the position, the resource group, and the interface, wherein the resource group includes at least four permissions: public, logged-in user, member user, and designated position; then, based on the target resource group, determines the menu to be rendered and the button to be rendered corresponding to the current user; then, based on the target resource group, the menu to be rendered and the button to be rendered are rendered to obtain a front-end operation interface; then, the front-end operation interface is sent to the front-end terminal corresponding to the current user to display the front-end operation interface on the front-end terminal. By introducing the permission system of "user, position, resource group, interface", the permission control is performed on the front-end and back-end at the interface level with the resource group as the core, thereby improving the security and flexibility of permission management and control.

[0066] In a feasible implementation manner, the rights management method further includes: Steps S210 to S220:

[0067] Step S210: acquiring permission information corresponding to each interface based on the first association relationship;

[0068] Step S220, constructing an interface permission tree based on the permission information corresponding to each interface, wherein the non-leaf nodes of the interface permission tree are the access path and access method of the interface, and the leaf nodes store the access rights of the interface.

[0069] In this embodiment, in the gateway application ( Figure 2 When the gateway in the system is started, the background server can obtain the permission information corresponding to each interface according to the first association relationship of "user-position-resource group-interface", and specifically query the permission scope (public, logged-in user, member user, specified position) corresponding to all interfaces according to the relationship between "position-resource group-interface" in the first association relationship and the permission scope configured by the resource group.

[0070] After obtaining the permission information of the interface, the background server constructs an interface permission tree (dictionary tree) based on the permission information corresponding to each interface. Specifically, the interface permission tree is initialized and constructed using the sureness framework and saved in memory. The non-leaf nodes of the interface permission tree are the access path and access method of the interface, and the leaf nodes store the access rights of the interface, such as Figure 3 As shown, in the interface permission tree, L#3 represents public permission, L#2 represents member user permission, L#1 represents logged-in user permission, and L#0 represents designated position permission; the subsequent 8-bit code represents the specific position code.

[0071] In a feasible implementation, after step S220, the rights management method may include steps S230 to S260:

[0072] Step S230, in response to the interface access request sent by the front-end terminal based on the front-end operation interface, querying the permission information corresponding to the interface access request based on the interface permission tree;

[0073] Step S240, obtaining user authority information corresponding to the interface access request;

[0074] Step S250, determining whether the user authority information matches the authority information corresponding to the interface access request;

[0075] Step S260: If the user authority information matches the authority information corresponding to the interface access request, the business logic corresponding to the interface access request is executed.

[0076] In this embodiment, the user can trigger an interface access request through a menu or button in the front-end operation interface displayed by the front-end terminal. After detecting the interface access request, the front-end terminal sends the interface access request to the gateway, and the gateway queries the permission information corresponding to the interface access request based on the interface permission tree. Specifically, the gateway uses a dictionary tree algorithm to efficiently search for permission information corresponding to the interface access request in the interface permission tree.

[0077] After obtaining the permission information corresponding to the interface access request, the gateway obtains the user permission information corresponding to the interface access request. The user permission information is the permission information of the login account of the front-end terminal, including whether the user is logged in, whether the user is a member user, whether there is a designated position, etc. After obtaining the user permission information, the gateway compares the permission information corresponding to the interface access request with the user permission information to determine whether the user permission information matches the permission information corresponding to the interface access request.

[0078] In this embodiment, if the user permission information matches the permission information corresponding to the interface access request, it indicates that the login account of the front-end terminal has the access rights to the interface corresponding to the interface access request, and then the gateway executes the business logic corresponding to the interface access request, that is, the gateway application routes the request to the specific backend server application to execute the subsequent business logic. By introducing the dictionary tree efficient permission matching algorithm of the sureness permission framework, the efficiency and security of permission control are further improved.

[0079] The permission management method proposed in this embodiment obtains the permission information corresponding to each interface based on the first association relationship; then, based on the permission information corresponding to each interface, an interface permission tree is constructed, wherein the non-leaf nodes of the interface permission tree are the access paths and access methods of the interfaces, and the leaf nodes store the access rights of the interfaces. The interface permission tree is introduced to improve the efficiency of permission matching, and the permission attributes of the leaf nodes of the permission tree are expanded to support fine-grained permission control in multiple dimensions such as public, logged-in users, member users, and designated positions.

[0080] In a feasible implementation, the rights management method may further include steps S310 to S320:

[0081] Step S310, detecting a resource configuration request and displaying a resource configuration interface;

[0082] Step S320: Detect the permission change request triggered by the resource configuration interface, obtain the permission change SQL corresponding to the permission change request, and execute the permission change SQL.

[0083] In this embodiment, an independent user name (project name) and password can be assigned to each project. The administrator can use the user name and password to log in to the resource configuration website. Specifically, when a resource configuration request is detected, a resource configuration interface is displayed, that is, the configuration interface corresponding to the resource configuration website. The resource permission configuration of the project can be performed through the resource configuration interface, including adding, editing, and deleting interfaces, adding, editing, and deleting menus, adding, editing, and deleting resource groups, etc.

[0084] In this embodiment, when a permission change request triggered by a resource configuration interface is detected, the permission change SQL corresponding to the permission change request is obtained, and the permission change SQL is executed, that is, the permission change SQL is executed in the database of the current environment to implement the permission change corresponding to the permission change request. In a feasible implementation, step S320 may include steps S321 to S323:

[0085] Step S321, obtaining permission change information and project name corresponding to the permission change request;

[0086] Step S322, determining the permission change SQL based on the permission change information, and executing the permission change SQL;

[0087] Step S323, recording the permission change SQL, the execution order corresponding to the permission change SQL and the project name in the current database.

[0088] In this embodiment, when a permission change request triggered by a resource configuration interface is detected, permission change information and a project name corresponding to the permission change request are obtained. The permission change information is the input information and selection information in the resource configuration interface, and the project name can be the user name of the project.

[0089] After obtaining the permission change information and the project name, the permission change SQL is determined based on the permission change information. In a feasible implementation, step S322 may include steps S3221 to S3222:

[0090] Step S3221, determining the difference information between the permission change information and the permission information corresponding to the project name in the current database;

[0091] Step S3222: Generate the permission change SQL based on the difference information.

[0092] In this embodiment, permission information corresponding to the project name is queried in the database of the current environment based on user information, and the difference information between the permission change information and the permission information corresponding to the project name is compared. It should be noted that the difference information may only include the difference information corresponding to the permission change information, that is, the difference corresponding to the permissions in the permission change information. For example, if the permission change information only includes the change information of permission A, then the difference information is the difference information corresponding to permission A.

[0093] After the difference information is obtained, a permission change SQL is generated based on the difference information, and the permission change SQL is executed, that is, the permission change SQL is executed in the database of the current environment to implement the permission change corresponding to the permission change request.

[0094] In this embodiment, after the execution of the permission change SQL is completed, the permission change SQL, the execution order corresponding to the permission change SQL, and the project name are recorded in the current database. Specifically, a custom mybatis interceptor can be used to record the record information of each permission change in the database. Each record information includes the execution sequence number of the permission change SQL, the permission change SQL, the batch number of the permission change SQL, and the project name.

[0095] In a feasible implementation manner, the rights management method may further include steps S330 to S350:

[0096] Step S330, detecting a permission change instruction to publish the permission change SQL to the next environment, obtaining the record information of the permission change in the current database and the name of the project to be published corresponding to the permission change instruction;

[0097] Step S340, searching the permission change sql corresponding to the project name to be released in the permission change sql of the record information;

[0098] Step S350, obtaining the execution order corresponding to the permission change SQL to be published in the record information, and executing the permission change SQL to be published in the database of the next environment based on the execution order.

[0099] In this embodiment, the permission change of a project can be published to the next environment. The permission change instruction to publish the permission change sql to the next environment is detected, and the record information of the permission change in the current database and the name of the project to be published corresponding to the permission change instruction are obtained. The name of the project to be published is the user name for logging in to the resource configuration website corresponding to the project whose permission change needs to be published to the next environment.

[0100] After obtaining the name of the project to be released, query the permission change sql to be released corresponding to the project name to be released in the permission change sql of the record information; at the same time, obtain the execution order corresponding to the permission change sql to be released in the record information, and execute the permission change sql to be released in the database of the next environment based on the execution order, thereby realizing one-click configuration of permission changes.

[0101] By comparing the differences in each permission configuration and the customized mybatis plug-in, the SQL script for each permission change is recorded, thereby supporting multiple project groups on the system group to perform permission configuration in parallel without affecting each other, and configuring once in the development environment and using it in multiple places in the test and production environments, thereby improving the efficiency of permission configuration.

[0102] The permission management method proposed in this embodiment detects a resource configuration request and displays a resource configuration interface; then detects a permission change request triggered by the resource configuration interface, obtains the permission change SQL corresponding to the permission change request, and executes the permission change SQL, thereby realizing the change of permissions and further improving the efficiency of permission configuration.

[0103] The rights management device provided in the embodiment of the present application adopts the rights management method in the above embodiment, which can solve the technical problem of how to improve the security and flexibility of the rights management of the RBAC model. Compared with the prior art, the beneficial effects of the rights management device provided in the embodiment of the present application are the same as the beneficial effects of the rights management method provided in the above embodiment, and the other technical features in the rights management device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0104] The present application provides a permission management device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the permission management method in the above-mentioned embodiment one.

[0105] Reference below Figure 4, which shows a schematic diagram of the structure of a rights management device suitable for implementing the embodiments of the present application. The rights management device in the embodiments of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The rights management device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0106] like Figure 4 As shown, the rights management device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the rights management device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the rights management device to communicate with other devices wirelessly or by wire to exchange data. Although the rights management device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0107] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0108] The rights management device provided by the present application adopts the rights management method in the above embodiment, which can solve the technical problem of how to improve the security and flexibility of the rights management of the RBAC model. Compared with the prior art, the beneficial effects of the rights management device provided by the present application are the same as the beneficial effects of the rights management method provided by the above embodiment, and the other technical features in the rights management device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0109] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0110] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0111] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the rights management method in the above-mentioned embodiment.

[0112] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0113] The computer-readable storage medium may be included in the rights management device; or may exist independently without being assembled into the rights management device.

[0114] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the permission management device, the permission management device: based on the first association relationship between users, positions, resource groups, and interfaces, determines the target resource group corresponding to the current user's position information in the resource group, wherein the resource group includes at least four types of permissions: public, logged-in user, member user, and designated position; based on the target resource group, determines the menu to be rendered and the button to be rendered corresponding to the current user; based on the target resource group, renders the menu to be rendered and the button to be rendered to obtain a front-end operation interface; sends the front-end operation interface to the front-end terminal corresponding to the current user, so as to display the front-end operation interface on the front-end terminal.

[0115] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0116] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0117] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0118] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned permission management method, and can solve the technical problem of how to improve the security and flexibility of the permission management of the RBAC model. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the permission management method provided in the above-mentioned embodiment, and will not be repeated here.

[0119] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned permission management method when executed by a processor.

[0120] The computer program product provided in this application can solve the technical problem of how to improve the security and flexibility of the permission management of the RBAC model. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the permission management method provided in the above embodiment, which will not be repeated here.

[0121] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A rights management method, characterized in that: The rights management method comprises the following steps: Based on the first association relationship among the user, the position, the resource group, and the interface, determine the target resource group corresponding to the position information of the current user in the resource group, wherein the resource group includes at least four permissions: public, logged-in user, member user, and designated position; Based on the target resource group, determine the menu to be rendered and the button to be rendered corresponding to the current user; Perform rendering operations on the menu to be rendered and the button to be rendered based on the target resource group to obtain a front-end operation interface; The front-end operation interface is sent to the front-end terminal corresponding to the current user, so as to display the front-end operation interface on the front-end terminal.

2. The rights management method according to claim 1, characterized in that: The step of determining the menu to be rendered and the button to be rendered corresponding to the current user based on the target resource group includes: Get the second association relationship between the menu, submenu, resource group, and interface; Based on the second association relationship and the target resource group, a menu to be rendered and a button to be rendered corresponding to the current user are determined.

3. The rights management method according to claim 1, characterized in that: The rights management method further includes: Based on the first association relationship, obtaining permission information corresponding to each interface; Based on the permission information corresponding to each interface, an interface permission tree is constructed, wherein the non-leaf nodes of the interface permission tree are the access paths and access methods of the interfaces, and the leaf nodes store the access rights of the interfaces.

4. The rights management method according to claim 3, characterized in that: After the step of constructing an interface permission tree based on the permission information corresponding to each interface, the permission management method further includes: In response to an interface access request sent by the front-end terminal based on the front-end operation interface, querying permission information corresponding to the interface access request based on the interface permission tree; Obtaining user authority information corresponding to the interface access request; Determining whether the user authority information matches the authority information corresponding to the interface access request; If the user authority information matches the authority information corresponding to the interface access request, the business logic corresponding to the interface access request is executed.

5. The rights management method as claimed in any one of claims 1 to 4, characterized in that: The rights management method further includes: A resource configuration request is detected and the resource configuration interface is displayed; A permission change request triggered by the resource configuration interface is detected, a permission change SQL corresponding to the permission change request is obtained, and the permission change SQL is executed.

6. The rights management method according to claim 5, characterized in that: The step of obtaining the permission change SQL corresponding to the permission change request and executing the permission change SQL includes: Obtaining permission change information and project name corresponding to the permission change request; Determine the permission change SQL based on the permission change information, and execute the permission change SQL; The permission change sql, the execution order corresponding to the permission change sql and the project name are recorded in the current database.

7. The rights management method according to claim 6, characterized in that: The step of determining the permission change SQL based on the permission change information includes: Determine the difference information between the permission change information and the permission information corresponding to the project name in the current database; The permission change SQL is generated based on the difference information.

8. The rights management method according to claim 6, characterized in that: After the step of recording the permission change SQL, the execution order corresponding to the permission change SQL and the user information in the current database, the permission management method further includes: Detecting a permission change instruction to publish the permission change SQL to the next environment, obtaining the record information of the permission change in the current database and the name of the project to be published corresponding to the permission change instruction; Query the permission change sql to be published corresponding to the name of the project to be published in the permission change sql of the record information; The execution order corresponding to the permission change sql to be published is obtained from the record information, and the permission change sql to be published is executed in the database of the next environment based on the execution order.

9. A rights management device, characterized in that: The rights management device comprises: a memory, a processor, and a rights management program stored in the memory and executable on the processor, wherein the rights management program implements the steps of the rights management method according to any one of claims 1 to 8 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a rights management program, and when the rights management program is executed by the processor, the steps of the rights management method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Resource management method and device, computer equipment and storage medium

    CN113204427A

  • Authority control implementation method and device, equipment and storage medium

    CN116644396A

  • Method and system for compliance forms and compliance forms user interface

    US20040073868A1