Authority management method and device, equipment and storage medium
By monitoring the changes in permission data on the application server and actively updating the client, the problem of untimely update of permission data in the existing technology is solved, and the accuracy and efficiency of permission verification are improved.
Patent Information
- Application Number
- CN202411239440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The client permission management mechanism of existing applications needs to request permission data from the server regularly, resulting in increased communication burden and delays in the front and back ends, and the permission data is not updated in time, resulting in permission verification errors.
Monitor the change of permission data on the application server, obtain the change of permission data and actively send it to the client, update the local stored permission data, and ensure that the client uses the latest permission data in a timely manner for verification.
It reduces the number of permission data requests from the client to the server, reduces the communication burden and delay of the front and back ends, and improves the accuracy and verification efficiency of permission data.
Smart Images

Figure CN119203082A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a permission management method, apparatus, device and storage medium. Background Art
[0002] With the increase in the complexity of Web applications and the scale of users, user permission management has become a key part of application (Application, App) client (front-end) development. The client permission data of existing applications is usually set by developers in the early stage of application development. The client permission data includes the user permission roles of various objects in the application client (such as application pages, functions, etc.). The set client permission data can be stored in the application server (back-end) and client.
[0003] When the application is running on the client, it will periodically send permission data requests to the application's server. After receiving the permission data request from the client, the server will send the current client permission data to each client of the application, so that each client can verify the user's permission based on the client permission data. However, since the client regularly requests permission data from the server, the burden and delay of front-end and back-end communication are increased, and when the permission data belonging to the application client on the server changes, the updated permission data cannot be synchronized to the client in the first time. The client will still use the original client permission data for permission verification, resulting in permission verification errors. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a permission management method, apparatus, device and storage medium.
[0005] A first aspect of the present disclosure provides a permission management method applicable to a server of an application, the method comprising:
[0006] When the permission data belonging to the application client changes in the application server, the permission change data is obtained, and the permission change data includes the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier;
[0007] In response to obtaining the permission change data, the permission change data is sent to each client of the application, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
[0008] A second aspect of the present disclosure provides a rights management method applicable to a client of an application, the method comprising:
[0009] Receive permission change data of the application sent by the server of the application, the permission change data including the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier, the permission change data being obtained by the server when the permission data belonging to the application client in the server changes and sent to each client of the application;
[0010] Update the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space to the target user authority role
[0011] A third aspect of the present disclosure provides a rights management device, applicable to a server of an application, the device comprising:
[0012] A first acquisition module is used to acquire permission change data when permission data belonging to the application client changes in the application server, the permission change data including the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier;
[0013] The first sending module is used to send the permission change data to each client of the application in response to obtaining the permission change data, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
[0014] A fourth aspect of the present disclosure provides a rights management device, applicable to a client of an application, the device comprising:
[0015] A receiving module is used to receive permission change data of an application sent by a server of the application, wherein the permission change data includes a target object identifier of a permission change in the application and a target user permission role corresponding to the target object identifier, and the permission change data is permission change data obtained by the server when permission data belonging to an application client in the server changes and sent to each client of the application;
[0016] An update module is used to update the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role
[0017] A fifth aspect of the present disclosure provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the permission management method of the first aspect can be implemented.
[0018] A sixth aspect of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the permission management method of the first aspect can be implemented.
[0019] Compared with the prior art, the technical solution provided by the present invention has the following advantages:
[0020] The present disclosure is that when the permission data belonging to the application client in the application server changes, the application server obtains the permission change data, the permission change data includes the target object identifier of the permission change in the application and the target user permission role corresponding to the target object identifier; in response to obtaining the permission change data, the permission change data is sent to each client of the application, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role. The present disclosure can be that when the permission data belonging to the application client in the application server changes, the server can actively send the permission change data to each client of the application at the first time the permission data changes, so that each client of the application can update the permission data in time, and then each client of the application performs permission verification with the updated permission data, thereby ensuring the accuracy of the permission data and the accuracy of the permission verification, and can greatly reduce the number of permission data requests from the client to the server, reduce the burden and delay of the front-end and back-end communication of the application during the permission change process, and improve the efficiency of permission adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] In order to more clearly illustrate the embodiments of the present invention 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.
[0023] Figure 1 is a flow chart of a permission management method provided by an embodiment of the present disclosure;
[0024] Figure 2 is a flow chart of another permission management method provided by an embodiment of the present disclosure;
[0025] Figure 3 is a flowchart of another permission management method provided by an embodiment of the present disclosure;
[0026] Figure 4 is a flow chart of another permission management method provided by an embodiment of the present disclosure;
[0027] Figure 5 It is a structural diagram of a rights management device provided by an embodiment of the present disclosure;
[0028] Figure 6 is a schematic diagram of the structure of another permission management device provided by an embodiment of the present disclosure;
[0029] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0035] In order to better understand the inventive concept of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure are described below in conjunction with exemplary embodiments.
[0036] Figure 1is a flowchart of a permission management method provided by an embodiment of the present disclosure. The method can be executed by an application server. The server can be understood as a computer device or an application installed in a computer device, such as Figure 1 As shown, the rights management method provided in this embodiment includes the following steps:
[0037] Step 110: When the permission data belonging to the application client changes in the application server, the permission change data is obtained, and the permission change data includes the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier.
[0038] In the embodiments of the present disclosure, the server of the application can be understood as a computer device or an application installed in a computer device, such as a backend server of the application. The server of the application stores the background data of the application and the permission data of the application. The permission data of the application may include the object identification of each object in the application and the user permission role corresponding to each object identification.
[0039] The front end of an application can be understood as the client of the application.
[0040] The object identifier can be understood as a unique identifier that can uniquely identify an object in an application. For example, the object identifier may include a function identifier, a button identifier, a page identifier, an operation identifier, and the like.
[0041] The user authority role corresponding to the object identifier can be understood as a user role that has the authority to operate the object corresponding to the object identifier. For example, the user authority role can include an administrator authority role, a special user authority role, a general user authority role, etc. Each user authority role has a certain authority range. The user authority role can be set as needed and is not limited here. For example, if the user authority role corresponding to the object identifier A in the application is the administrator authority role, then the administrator has the authority to operate the object a corresponding to the object identifier A.
[0042] In the disclosed embodiment, the server of the application can monitor whether the permission data belonging to the application client in the server has changed. When the permission data belonging to the application client in the server has changed, the server can obtain the permission change data, which may include the target object identifier of the application in which the permission change has occurred and the target user permission role corresponding to the target object identifier.
[0043] In some embodiments, the permission change data of the application may be generated by an administrator of the application performing a permission adjustment operation on a user permission role corresponding to a target object identifier in the application on a client of the application.
[0044] In other embodiments, the permission change data of the application may be generated by an administrator of the application performing a permission adjustment operation on a user permission role corresponding to a target object identifier in the application on a server side of the application.
[0045] Step 120: In response to obtaining the permission change data, the permission change data is sent to each client of the application, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
[0046] In the disclosed embodiment, after obtaining the permission change data, the server of the application can send the permission change data to each client of the application in response to obtaining the permission change data, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
[0047] The local storage space of the client of the application pre-stores the object identification of each object in the application and the user authority role corresponding to each object identification.
[0048] In some embodiments, the server of the application can send permission change data to each client of the application based on the WebSocket communication protocol.
[0049] WebSocket is a protocol for full-duplex communication over a single TCP connection. WebSocket makes data exchange between the client and the server easier and allows the server to actively push data to the client.
[0050] In the embodiment of the present disclosure, when the permission data belonging to the application client changes in the application server, the application server obtains the permission change data, the permission change data includes the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier; in response to obtaining the permission change data, the permission change data is sent to each client of the application, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role. In the present disclosure, when the permission data belonging to the application client changes in the application server, the server can actively send the permission change data to each client of the application as soon as the permission data changes, so that each client of the application can update the permission data in time, and then each client of the application can perform permission verification with the updated permission data, thereby ensuring the accuracy of the permission data and the accuracy of the permission verification, and can greatly reduce the number of permission data requests from the client to the server, reduce the burden and delay of the front-end and back-end communication of the application during the permission change process, and improve the efficiency of permission adjustment.
[0051] Figure 2 is a flowchart of a permission management method provided by an embodiment of the present disclosure. The method can be executed by an application client. The client can be understood as a computer device or an application installed in a computer device, such as Figure 2 As shown, the rights management method provided in this embodiment includes the following steps:
[0052] Step 210: Receive permission change data of the application sent by the application server. The permission change data includes the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier. The permission change data is the permission change data obtained by the server when the permission data belonging to the application client in the server changes and sent to each client of the application.
[0053] In the disclosed embodiment, the server of the application can obtain permission change data when the permission data belonging to the application client in the server of the application changes, and then send the permission change data to each client of the application in response to the obtained permission change data. The client of the application can receive the permission change data sent by the server of the application.
[0054] The permission change data may include the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier.
[0055] Step 220: Update the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space to the target user authority role.
[0056] In the disclosed embodiment, after receiving the permission change data sent by the application server, the application client may update the current user permission role corresponding to the target object identifier in the application permission data stored in the client's local storage space to the target user permission role.
[0057] Therefore, when the permission data belonging to the application client changes in the application server, the server can actively send the permission change data to each client of the application as soon as the permission data changes, so that each client of the application can update the permission data in time, and then each client of the application can perform permission verification with the updated permission data, thereby ensuring the accuracy of the permission data and the accuracy of the permission verification, and can greatly reduce the number of permission data requests from the client to the server, reduce the burden and delay of the front-end and back-end communication of the application during the permission change process, and improve the efficiency of permission adjustment.
[0058] Figure 3is a flowchart of a permission management method provided by an embodiment of the present disclosure, and the method can be executed by an application client, such as Figure 3 As shown, the rights management method provided in this embodiment includes the following steps:
[0059] Step 310: In response to the application administrator's permission adjustment operation on the application, obtain the target object identifier of the permission adjustment operation in the application and the target user permission role corresponding to the target object identifier.
[0060] In the embodiment of the present disclosure, a permission management page is provided in the application, and the permission management page may include object identifiers of various objects of the application and user permission roles corresponding to each object identifier.
[0061] When the permissions of the target object in the application need to be adjusted, the administrator of the application can perform permission adjustment operations on the target object in the permission management page of the application, such as selecting and clicking on the target user permission role corresponding to the target object identifier of the target object, and the client of the application can respond to the administrator's permission adjustment operation on the application and obtain the target object identifier of the permission adjustment operation in the application and the target user permission role corresponding to the target object identifier. For example, if the target object identifier is function identifier B, the target user permission role corresponding to function identifier B is an ordinary user permission role, that is, an ordinary user has the operation permission of function b corresponding to function identifier B.
[0062] In some embodiments, before responding to an application administrator's permission adjustment operation on the application, the application's client can generate object identifiers corresponding to each object of the application and user permission roles corresponding to each object identifier in response to the administrator's creation operation of the application's permission management page; then, based on each object identifier and the user permission role corresponding to each object identifier, create a permission management page for the application, so that the administrator can perform permission adjustment operations on the application based on the permission management page.
[0063] Step 320: Send the target object identifier and the target user permission role corresponding to the target object identifier to the server of the application, so that the server updates the current user permission role corresponding to the target object identifier in the permission data belonging to the application client in the server to the target user permission role, and obtains permission change data when the permission data changes, and in response to obtaining the permission change data, sends the permission change data to each client of the application, the permission change data including the target object identifier in the application where the permission change occurs and the target user permission role corresponding to the target object identifier.
[0064] Step 330: Receive application permission change data sent by the application server.
[0065] Step 340: Update the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space to the target user authority role.
[0066] As a result, the administrator of the application can directly adjust the permission data of the application in the client of the application, which improves the convenience of permission adjustment. When the permission data belonging to the application client in the application server changes, the server can actively send the permission change data to each client of the application as soon as the permission data changes, so that each client of the application can update the permission data in time, and then each client of the application performs permission verification with the updated permission data, which ensures the accuracy of the permission data and the accuracy of the permission verification, and can greatly reduce the number of permission data requests from the client to the server, reduce the burden and delay of the front-end and back-end communication of the application during the permission change process, and improve the efficiency of permission adjustment.
[0067] Figure 4 is a flowchart of a permission management method provided by an embodiment of the present disclosure, which can be executed by an application client, such as Figure 4 As shown, the rights management method provided in this embodiment includes the following steps:
[0068] Step 410: Receive permission change data of the application sent by the application server. The permission change data includes the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier. The permission change data is the permission change data obtained by the server when the permission data in the server changes and sent to each client of the application.
[0069] Step 420: Update the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space to the target user authority role.
[0070] Step 430: In response to the user logging into the application in the client, current permission data is obtained from the local storage space of the client.
[0071] In the embodiment of the present disclosure, the client of the application may obtain the current permission data from the local storage space of the client in response to the user logging into the application in the client.
[0072] The current permission data is the current permission data belonging to the application client.
[0073] Step 440: Obtain the user authority role corresponding to each object identifier in the application from the current authority data.
[0074] Step 450: Search for a target authority role that matches the target role to which the user belongs among the user authority roles corresponding to each object identifier.
[0075] In the embodiment of the present disclosure, the target role to which the user belongs can be understood as the target role to which the user's identity belongs.
[0076] After obtaining the user authority roles corresponding to the object identifiers in the application, the client of the application can search for a target authority role that matches the target role to which the user belongs among the user authority roles corresponding to the object identifiers.
[0077] For example, if the target role to which the user belongs is a common user, the application client may search for a target permission role that matches the common user among the user permission roles corresponding to each object identifier, that is, the common user permission role.
[0078] Step 460: Display objects corresponding to the target permission role.
[0079] In the disclosed embodiment, the application client can display the object corresponding to the target permission role. For example, if the target permission role is a common user permission role, the application client can display the object corresponding to the common user permission role, that is, display the object that the common user permission role can operate.
[0080] Therefore, after the user logs in to the application client, only one permission verification is required to display the objects in the application that the user has permission to operate, which greatly reduces the number of permission verifications in the client and improves the efficiency of permission verification.
[0081] In some embodiments of the present disclosure, the permission data of an application may include object identifiers corresponding to various objects in the application, user permission roles corresponding to each object identifier, and the validity period of each user permission role.
[0082] For each object identifier in the application, the client of the application may delete the user authority role corresponding to the object identifier in the local storage space when the validity period of the user authority role corresponding to the object identifier is equal to 0.
[0083] Furthermore, for each object identifier in the application, when the effective duration of the user authority role corresponding to the object identifier is equal to 0, the server of the application can delete the user authority role corresponding to the object identifier in the server.
[0084] In some embodiments, the permission management page of the application may include the validity period of the user permission role corresponding to each object identifier. The administrator may perform validity period setting operations on the user permission role corresponding to each object identifier in the application in the permission management page of the application, such as a selection operation, an input operation, etc. on the validity period of the user permission role. The client of the application may store the validity period of the user permission role corresponding to each object identifier in the local storage space of the client in response to the administrator's setting operation of the validity period of the user permission role corresponding to each object identifier in the application; and then send the validity period of the user permission role corresponding to each object identifier to the server of the application, so that the server synchronously stores the validity period of the user permission role corresponding to each object identifier.
[0085] Therefore, the validity period of the user authority role corresponding to each object identifier in the application can be set and stored in the client and server of the application, and expired invalid authority data can be deleted in time, thereby improving the flexibility of authority data adjustment.
[0086] Figure 5 is a schematic diagram of the structure of a rights management device provided by an embodiment of the present disclosure, and the device can be understood as the above-mentioned server or some functional modules in the above-mentioned server. Figure 5 As shown, the rights management device 500 includes:
[0087] The first acquisition module 510 is used to acquire permission change data when permission data belonging to the application client changes in the application server, the permission change data including the target object identifier of the application in which the permission changes occur and the target user permission role corresponding to the target object identifier;
[0088] The first sending module 520 is used to send the permission change data to each client of the application in response to obtaining the permission change data, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
[0089] Optionally, the first sending module includes:
[0090] The sending submodule is used to send permission change data to various clients of the application based on the WebSocket communication protocol.
[0091] The rights management device provided in the embodiments of the present disclosure can implement the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0092] Figure 6Schematic diagram of a rights management device provided by an embodiment of the present disclosure, which can be understood as the above-mentioned client or some functional modules in the above-mentioned client. Figure 6 As shown, the rights management device 600 includes:
[0093] The receiving module 610 is used to receive permission change data of the application sent by the application server, the permission change data including the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier, the permission change data is the permission change data obtained by the server when the permission data belonging to the application client in the server changes and sent to each client of the application;
[0094] The updating module 620 is used to update the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space to the target user authority role.
[0095] Optionally, the above-mentioned rights management device 600 includes:
[0096] A second acquisition module is used to obtain a target object identifier of the permission adjustment operation in the application and a target user permission role corresponding to the target object identifier in response to the permission adjustment operation of the application by the administrator of the application;
[0097] The second sending module is used to send the target object identifier and the target user authority role corresponding to the target object identifier to the server of the application, so that the server updates the current user authority role corresponding to the target object identifier in the authority data belonging to the application client in the server to the target user authority role, and obtains the authority change data when the authority data changes, and in response to obtaining the authority change data, sends the authority change data to each client of the application.
[0098] Optionally, the above-mentioned rights management device 600 includes:
[0099] A generation module, for generating object identifiers corresponding to various objects of the application and user authority roles corresponding to each object identifier in response to an administrator's creation operation on the permission management page of the application;
[0100] The creation module is used to create a permission management page for the application based on each object identifier and the user permission role corresponding to each object identifier, so that the administrator can adjust the permission of the application based on the permission management page.
[0101] Optionally, the above-mentioned rights management device 600 includes:
[0102] A third acquisition module, configured to acquire current permission data belonging to the application client from a local storage space of the client in response to a user logging into the application in the client;
[0103] A fourth acquisition module is used to acquire the user authority role corresponding to each object identifier in the application from the current authority data;
[0104] A search module is used to search for a target permission role that matches the target role to which the user belongs among the user permission roles corresponding to each object identifier;
[0105] The display module is used to display the objects corresponding to the target permission role.
[0106] The rights management device provided in the embodiments of the present disclosure can implement the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0107] The embodiments of the present disclosure also provide a computer device, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented, and its execution method and beneficial effects are similar and will not be repeated here.
[0108] The computer device in the embodiments of the present disclosure may be understood as any computer device with processing and computing capabilities, and the device may include but is not limited to mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals, wearable devices, etc., as well as fixed electronic devices such as digital TVs, desktop computers, smart home devices, etc.
[0109] Figure 7 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure, such as Figure 7 As shown, the computer device 700 may include a processor 710 and a memory 720, wherein the memory 720 stores a computer program 721, and when the computer program 721 is executed by the processor 710, the method provided by any of the above embodiments can be implemented, and its execution method and beneficial effects are similar, which will not be repeated here.
[0110] Of course, to simplify, Figure 7 Only some of the components related to the present invention in the computer device 700 are shown, and components such as a bus, an input / output interface, an input device, and an output device are omitted. In addition, according to specific application conditions, the computer device 700 may also include any other appropriate components.
[0111] An embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.
[0112] The above-mentioned computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.
[0113] The computer program may be written in any combination of one or more programming languages to write program codes for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer device, partially on the user's device, as a separate software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.
[0114] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0115] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0116] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A rights management method, characterized in that: Applicable to the server of the application, the method includes: When permission data belonging to the application client changes in the application server, obtaining permission change data, the permission change data including the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier; In response to acquiring the permission change data, the permission change data is sent to each client of the application, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
2. The method according to claim 1, characterized in that: The sending the permission change data to each client of the application includes: Based on the WebSocket communication protocol, the permission change data is sent to each client of the application.
3. A rights management method, characterized in that: Applicable to a client of an application, the method comprises: Receive permission change data of the application sent by the server of the application, the permission change data including the target object identifier of the application in which the permission change occurs and the target user permission role corresponding to the target object identifier, the permission change data being obtained by the server when the permission data belonging to the application client in the server changes and sent to each client of the application; The current user authority role corresponding to the target object identifier in the authority data stored in the local storage space is updated to the target user authority role.
4. The method according to claim 3, characterized in that Before receiving the permission change data of the application sent by the server of the application, the method further includes: In response to a permission adjustment operation of the application by the administrator of the application, obtaining a target object identifier of the permission adjustment operation in the application and a target user permission role corresponding to the target object identifier; The target object identifier and the target user permission role corresponding to the target object identifier are sent to the server of the application, so that the server updates the current user permission role corresponding to the target object identifier in the permission data belonging to the application client in the server to the target user permission role, obtains permission change data when the permission data changes, and in response to obtaining the permission change data, sends the permission change data to each client of the application.
5. The method according to claim 4, characterized in that Before responding to the administrator's permission adjustment operation on the application, the method further includes: In response to an administrator's creation operation on an application's permission management page, generating object identifiers corresponding to various objects of the application and user permission roles corresponding to each object identifier; Based on each of the object identifiers and the user authority role corresponding to each of the object identifiers, a authority management page for the application is created, so that the administrator can perform authority adjustment operations on the application based on the authority management page.
6. The method according to claim 3, characterized in that After the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space is updated to the target user authority role, the method further includes: In response to a user logging into the application in the client, obtaining current permission data belonging to the application client from a local storage space of the client; Acquire the user authority role corresponding to each object identifier in the application from the current authority data; Searching for a target authority role that matches a target role to which the user belongs among the user authority roles corresponding to the object identifiers; Display the objects corresponding to the target permission role.
7. A rights management device, characterized in that: Applicable to the server side of the application, the device comprises: A first acquisition module is used to acquire permission change data when permission data belonging to the application client in the server of the application changes, wherein the permission change data includes a target object identifier of the application in which permission changes occur and a target user permission role corresponding to the target object identifier; The first sending module is used to send the permission change data to each client of the application in response to obtaining the permission change data, so that each client updates the current user permission role corresponding to the target object identifier in the permission data stored in the local storage space to the target user permission role.
8. A rights management device, characterized in that: Applicable to the client of the application, the device comprises: a receiving module, configured to receive permission change data of the application sent by the server of the application, wherein the permission change data includes a target object identifier of the application in which permission change occurs and a target user permission role corresponding to the target object identifier, and the permission change data is permission change data acquired by the server when permission data belonging to the application client in the server changes and sent to each client of the application; The updating module is used to update the current user authority role corresponding to the target object identifier in the authority data stored in the local storage space to the target user authority role.
9. A computer device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the rights management method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the rights management method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Control module and method for application program
CN101320415A
Program updating method and device, storage medium and electronic equipment
CN110659053A
Information processing method and device, equipment and storage medium
CN115952485A
Authority management method and device, equipment and storage medium
CN116204894A
Management method and management system for connection authority to server
JP2005056105A
