Data authority management method, device and server
By configuring multiple data operation interfaces and data configuration tables in the server to determine user permissions, the problem of low data operation security in the existing technology is solved, and higher data resource protection is achieved.
Patent Information
- Application Number
- CN202010594420.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-24
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-06-24
AI Technical Summary
Existing data permission management methods have low security issues when users operate data, and cannot quickly and conveniently verify whether users have operation permissions.
By configuring multiple data operation interfaces in the server, the pre-configured data configuration table is used to determine whether the user has operation permissions. The data configuration table includes the correspondence between user roles, data objects and data permissions. The target data operation interface is determined and based on permission to operate.
It effectively improves the security when operating data objects, ensures that users can only operate with permissions, and enhances the protection of data resources.
Smart Images

Figure CN113836501B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a data authority management method, device and server. Background Art
[0002] Data permissions refer to the control of user visibility of data resources, that is, users who meet certain conditions can only view the data resources corresponding to the conditions. Currently, the granularity of data permissions is low. When users perform operations other than viewing on data resources, it is impossible to quickly and conveniently verify whether the user has the corresponding permissions for the operation, resulting in low security when users operate data resources. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a data permission management method, device and server, which can effectively improve the security when operating data objects.
[0004] In a first aspect, an embodiment of the present invention provides a method for managing data permissions, the method being applied to a server, the server being configured with multiple data operation interfaces, the method comprising: if a data operation instruction carrying a user identifier sent by a user is received, determining a target data operation interface corresponding to the data operation instruction from each of the data operation interfaces; utilizing the target data operation interface, based on the user identifier and a pre-configured data configuration table, determining whether the user has the operation permission corresponding to the target data operation interface; wherein the data configuration table comprises a correspondence between user roles, data objects and data permissions, the data permissions being used to characterize the operation permission of the user role relative to the data object; the data operation interfaces correspond one-to-one to the operation permissions; if so, operating on the target data object corresponding to the target user role to which the user identifier belongs according to the operation permission corresponding to the target data operation interface.
[0005] In one embodiment, the data configuration table also includes data ownership; the data ownership is used to characterize the ownership relationship of the data object relative to the user role; the step of using the target data operation interface to determine whether the user has the operation authority corresponding to the target data operation interface based on the user identifier and the data configuration table includes: determining the target user role to which the user belongs based on the user identifier; using the target data operation interface, reading the data configuration table to obtain the data ownership and data authority corresponding to the target user role; based on the data ownership and data authority corresponding to the target user role, determining whether the user has the operation authority corresponding to the target data operation interface.
[0006] In one embodiment, the step of determining whether the user has the operation permission corresponding to the target data operation interface based on the data ownership and data permission corresponding to the target user role includes: obtaining the target data object corresponding to the target user role to which the user identifier belongs based on the data ownership corresponding to the target user role; determining whether the data permission corresponding to the target data object includes the operation permission corresponding to the target data operation interface; and if so, determining that the user has the operation permission corresponding to the target data operation interface.
[0007] In one embodiment, the data operation instruction carries an operation identifier; the step of determining the target data operation interface corresponding to the data operation instruction from each of the data operation interfaces includes: based on a matching relationship between a pre-configured operation identifier and the data operation interface, determining the target data operation interface that matches the operation identifier carried by the data operation instruction.
[0008] In one embodiment, the method also includes: displaying the role to be configured, the object to be configured, the affiliation to be configured and the permission to be configured through a designated interface, so that the user configures and saves the correspondence between the role to be configured, the object to be configured, the affiliation to be configured and the permission to be configured, and obtains the data configuration table.
[0009] In one implementation, the method further includes: if the user does not have the operation authority corresponding to the target data operation interface, prompting the user that he cannot operate the target data object corresponding to the target user role to which the user identifier belongs.
[0010] In one implementation, the data operation interface includes one or more of a new data interface, a modified data interface, a deleted data interface, and a query data interface.
[0011] In a second aspect, an embodiment of the present invention further provides a data permission management device, which is applied to a server, and the server is configured with multiple data operation interfaces, and the device includes: an interface determination module, which is used to determine, from each of the data operation interfaces, a target data operation interface corresponding to the data operation instruction if a data operation instruction carrying a user identifier is received from a user; a permission judgment module, which is used to use the target data operation interface to judge whether the user has the operation permission corresponding to the target data operation interface based on the user identifier and a pre-configured data configuration table; wherein the data configuration table includes a correspondence between user roles, data objects and data permissions, and the data permissions are used to characterize the operation permission of the user role relative to the data object; the data operation interface corresponds to the operation permission one-to-one; and an object operation module, which is used to operate the target data object corresponding to the target user role to which the user identifier belongs according to the operation permission corresponding to the target data operation interface when the judgment result of the permission judgment module is.
[0012] In a third aspect, an embodiment of the present invention further provides a server, comprising a processor and a memory; a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in any one of the first aspects is executed.
[0013] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium for storing computer software instructions used for any of the methods provided in the first aspect.
[0014] A data permission management method, device and server provided by an embodiment of the present invention are applied to a server configured with multiple data operation interfaces. If a data operation instruction carrying a user identifier sent by a user is received, the target data operation interface corresponding to the data operation instruction will be determined from each data operation interface, and the target data operation interface will be used based on the user identifier and a pre-configured data configuration table. If the user has the operation permission corresponding to the target data operation interface, the target data object corresponding to the target user role to which the user identifier belongs will be operated according to the operation permission corresponding to the target data operation interface. Among them, the above-mentioned data configuration table includes the correspondence between user roles, data objects and data permissions. The data permission is used to characterize the operation permission of the user role relative to the data object, and the data operation interface corresponds to the operation permission one by one. The above-mentioned method determines the target data operation interface when receiving the data operation instruction sent by the user, and uses the target data operation interface to verify the user's operation permission based on the user identifier and the data configuration table carried by the data operation instruction, which effectively improves the problem of the operation permission that cannot be verified quickly and conveniently in the prior art, thereby improving the security when operating data objects.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flowchart of a data authority management method provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of a data configuration table provided in an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of another data configuration table provided in an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of a designated interface provided by an embodiment of the present invention;
[0022] Figure 5 A flowchart of another data authority management method provided by an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of the structure of a data authority management device provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] At present, there is a problem of low security when operating data objects based on the existing data permission management method. Based on this, the present invention implements a data permission management method, device and server, which can effectively improve the security when operating data objects.
[0027] To facilitate understanding of this embodiment, a data permission management method disclosed in an embodiment of the present invention is first introduced in detail. The method is applied to a server, and the server is configured with multiple data operation interfaces, wherein the data operation interface may include one or more of a new data interface, a modification data interface, a deletion data interface, and a query data interface, see Figure 1 The flowchart of a data permission management method shown in FIG. 1 mainly includes the following steps S102 to S106:
[0028] Step S102: if a data operation instruction carrying a user identifier is received from a user, a target data operation interface corresponding to the data operation instruction is determined from various data operation interfaces.
[0029] Among them, the user identifier is used to represent the user's identity information, and may include a user ID (Identity document) or a user name, etc. The data operation instruction is used to represent the user's operation to be performed on the data object, wherein the data operation instruction may carry an operation identifier of the operation to be performed, for example, the data operation instruction may carry a new operation identifier, a modification operation identifier, a deletion operation identifier, and a query operation identifier. In one embodiment, the data operation interface corresponding to the operation identifier may be determined as the target data operation interface. For example, if the operation identifier carried by the data operation instruction is a new operation identifier, the new data interface may be determined as the target data operation interface.
[0030] Step S104, using the target data operation interface, based on the user identification and the pre-configured data configuration table, it is determined whether the user has the operation authority corresponding to the target data operation interface.
[0031] Among them, the data configuration table includes the correspondence between user roles, data objects and data permissions. The data permissions are used to characterize the operation permissions of user roles relative to data objects, and the data operation interface corresponds to the operation permissions one by one. The user role is used to characterize the corresponding role of the user in the server, such as sales, sales management or operation; the data object is also the data resource stored in the server; the data permission includes the permission to add operations, modify operations, delete operations and query operations on the data object. In addition, the data operation interface can be used to verify whether the user has the operation permission corresponding to the data operation interface. For example, the new data interface can be used to verify whether the user has the permission to perform new operations on the data object. In one embodiment, the target user role to which the user identifier belongs can be determined, and then the target data operation interface is used to obtain the data object and data permission corresponding to the target user role according to the data configuration table. By judging whether the acquired data permission contains the operation permission corresponding to the target data operation interface, it can be known whether the user has the operation permission corresponding to the target data operation interface.
[0032] Step S106: If yes, operate the target data object corresponding to the target user role to which the user ID belongs according to the operation authority corresponding to the target data operation interface. For example, if the data authority obtained by the new data interface includes the new operation authority, it is determined that the user has the data operation authority, and the user can perform the new operation on the data object corresponding to the target user role.
[0033] The above-mentioned data permission management method provided by the embodiment of the present invention determines the target data operation interface when receiving the data operation instruction sent by the user, and uses the target data operation interface to verify the user's operation permission based on the user identifier and data configuration table carried by the data operation instruction, effectively improving the problem of operation permission that cannot be verified quickly and conveniently in the prior art, thereby improving the security when operating data objects.
[0034] In one embodiment, the data operation instruction carries an operation identifier, and the operation identifier may include one or more of a new operation identifier, a modification operation identifier, a deletion operation identifier, and a query operation identifier, and the data operation interface may include one or more of a new data interface, a modification data interface, a deletion data interface, and a query data interface. Among them, the new data interface may be used to verify whether the user has the permission to add operations, and perform a new operation on the data object when the user has the permission to add operations; similarly, the modification data interface is used to verify whether the user has the permission to modify operations, and perform a modification operation on the data object when the user has the permission to modify operations; similarly, the deletion interface is used to verify whether the user has the permission to delete operations, and perform a deletion operation on the data object when the user has the permission to delete operations; similarly, the query data interface is used to verify whether the user has the permission to query operations, and perform a query operation on the data object when the user has the permission to query operations.
[0035] Based on this, the embodiment of the present invention provides an exemplary implementation of the above step S102, which can determine the target data operation interface that matches the operation identifier carried by the data operation instruction based on the matching relationship between the pre-configured operation identifier and the data operation interface. For example, the matching relationship between the new operation identifier and the new data interface, the matching relationship between the modification operation identifier and the modification data interface, the matching relationship between the deletion operation identifier and the deletion data interface, and the matching relationship between the query operation identifier and the query data interface are pre-configured. Assuming that the operation identifier carried in the data operation instruction is a new operation identifier, the new data interface can be directly determined as the target data operation interface.
[0036] To facilitate understanding of the data configuration table provided in the above embodiment, an embodiment of the present invention exemplarily provides a schematic diagram of a data configuration table, such as Figure 2 As shown, the data configuration table contains the corresponding relationship between user roles (also called operators), data permissions and data objects. For example, Figure 2 It is illustrated in the figure that the user roles include sales, sales management and operations. The data permissions corresponding to the user roles include new operation permissions, modification operation permissions and query operation permissions. The data objects corresponding to the user roles include "customer data", "sales opportunity data", "activity data" and "contact data".
[0037] Depend on Figure 2 It can be seen that the above data configuration table provided in the embodiment of the present invention also includes data ownership, which is used to characterize the ownership relationship of the data object relative to the user role, wherein the data ownership may include the user himself, the department to which the user belongs, or the department to which the user belongs and its subordinate departments, etc. Figure 2The data corresponding to the data object "customer data" belongs to "myself", the data corresponding to the data object "sales opportunity data" belongs to "the department to which the user belongs", the data corresponding to the data object "activity data" belongs to "the department to which the user belongs and its subordinate departments", and the data corresponding to the data object "contact data" belongs to "all".
[0038] The embodiment of the present invention provides a specific implementation method of using a target data operation interface to determine whether a user has the operation authority corresponding to the target data operation interface based on a user identifier and a data configuration table. For details, see the following steps 1 to 3:
[0039] Step 1: Determine the target user role to which the user belongs based on the user identifier. To facilitate understanding of step 1, an embodiment of the present invention provides a schematic diagram of another data configuration table, such as Figure 3 As shown, the data configuration table may also include a user table, a user / role association table, and a role table, wherein the user table includes a user identifier, which includes a user ID and / or a user name (User_Name), the user / role association table includes the correspondence between the user identifier and the user role, such as the correspondence between the user ID and the role ID of the user role, the role table includes the role ID and the role name (Role_Name), and the data configuration table also includes the correspondence between the role ID, the data type (Data_Type), the role ownership (Data_Owner), and the data permission (Data_Permission). In specific implementation, you can use Figure 3 The data configuration table shown queries the user role corresponding to the user identification carried in the data operation instruction, thereby determining the target user role.
[0040] Step 2: Use the target data operation interface to read the data configuration table to obtain the data ownership and data permissions corresponding to the target user role. In one embodiment, a client service terminal and a data configuration terminal can be set up in the server, respectively. The client service terminal is used to provide data operation services to users, and the data configuration terminal is used to configure and save the data configuration table. The data operation interface is set in the client service terminal. The user accesses the target data operation interface, and the target data operation interface obtains and reads the data configuration table from the data configuration terminal to obtain the data ownership and data permissions corresponding to the target user role.
[0041] Step 3: Based on the data ownership and data permissions corresponding to the target user role, determine whether the user has the operation permissions corresponding to the target data operation interface. In one embodiment, the steps of determining whether the user has the operation permissions corresponding to the target data operation interface based on the data ownership and data permissions corresponding to the target user role can be performed according to the following steps 3.1 to 3.3:
[0042] Step 3.1, based on the data ownership corresponding to the target user role, obtain the target data object corresponding to the target user role to which the user identifier belongs. Based on the data configuration table provided in the above embodiment, it can be seen that the data configuration table contains data objects and data ownership corresponding to the user role. If the data belongs to the department to which the user belongs, the list of departments managed by the user can be queried in the system organizational structure, and the data objects corresponding to each department in the department list can be obtained; if the data belongs to the department to which the user belongs and its subordinate departments, the department list of the department to which the user belongs and its subordinate departments can be queried in the system organizational structure, and the data objects corresponding to each department in the department list can be obtained; if the data belongs to the user himself, the data object whose owner is the user himself is obtained in the system; if the data belongs to all, it means that all data objects can be obtained.
[0043] Step 3.2, determine whether the data permissions corresponding to the target data object include the operation permissions corresponding to the target data operation interface. If yes, execute step 3.3; if not, determine that the user does not have the operation permissions corresponding to the target data operation interface, and prompt the user that he cannot operate the target data object corresponding to the target user role to which the user ID belongs. For example, the data permissions corresponding to the target data object include query operation permissions, new operation permissions, and modification operation permissions. If the target data operation interface is a modification data interface, that is, the operation permissions corresponding to the target data operation interface are modification operation permissions, it can be seen that the data permissions corresponding to the target data object include the operation permissions corresponding to the target data operation interface. At this time, it is determined that the user has the operation permissions corresponding to the target data operation interface, and performs modification operations on the target data object based on the modification operation permissions; if the target data operation interface is a deletion data interface, that is, the operation permissions corresponding to the target data operation interface are deletion operation permissions, and the data permissions corresponding to the target data object do not include the operation permissions corresponding to the target data operation interface, then the user can be prompted that the target data object cannot be deleted.
[0044] Step 3.3: If yes, make sure the user has the corresponding operation authority for the target data operation interface.
[0045] In addition, the embodiment of the present invention also provides a method for configuring the above data configuration table, which can display the roles to be configured, the objects to be configured, the affiliations to be configured, and the permissions to be configured through a specified interface, so that the user can configure and save the corresponding relationship between the roles to be configured, the objects to be configured, the affiliations to be configured, and the permissions to be configured, and obtain the data configuration table. The embodiment of the present invention exemplarily provides a schematic diagram of a specified interface, such as Figure 4 As shown, Figure 4It is illustrated that the specified interface may include user roles, data objects, data ownership and data permissions to be configured, wherein user roles and data objects may display optional options in the form of a list, and data permissions include adding new data permissions, modifying data permissions, deleting data permissions and querying data permissions. Users may cooperate with the data configuration table through the above-mentioned specified interface to achieve visual management of data permissions. In addition, compared with the problems of inflexible configuration and complicated modification process when configuring data permissions in a hard-coded manner in the prior art, the embodiments of the present invention may configure data permissions more flexibly and facilitate the management of data permissions.
[0046] To facilitate understanding of the data permission management method provided in the above embodiment, another data permission management method is provided in the embodiment of the present invention. Figure 5 The flowchart of another data permission management method shown in FIG. 1 mainly includes the following steps S502 to S514:
[0047] Step S502, configure user roles and data permissions corresponding to user roles. User roles include sales, sales management or operations, etc., and data permissions corresponding to each user role can be configured. Data permissions are reflected in the data permissions owned by the data objects under the specified data ownership. Among them, data permissions are divided into four types: adding, modifying, deleting, and querying; data objects are divided into: customers, sales opportunities, activities, etc., which are generally specific business names; data ownership is divided into: myself (that is, the above-mentioned user myself), the department managed by myself (that is, the department to which the above-mentioned user belongs), all subordinate departments of the department managed by myself (that is, the department to which the above-mentioned user belongs and its subordinate departments), etc. For example: sales have the authority to add, modify, delete, and query customers belonging to myself, and sales only have the authority to view high seas customers; for the department managed by myself and all customers responsible for sales in the subordinate departments, sales management has the authority to add, modify, delete, and query. In actual applications, user roles, data objects, data ownership, and data permissions can be configured through the platform background configuration (that is, the above-mentioned data configuration end), so as to clearly reflect the relationship between user roles, data objects, data ownership, and data permissions.
[0048] Step S504: receiving a user request (ie, the above-mentioned data operation request). In one implementation, the user request may be received via the platform front end.
[0049] Step S506, determining the target user role. In specific implementation, the target user role corresponding to the user identifier carried in the user request can be determined through the above data configuration table.
[0050] Step S508, obtaining the user's data authority according to the target user role and the data object to be accessed. As can be seen from the above embodiment, the data configuration table contains the correspondence between the target user role, data object and data authority, so the user's data authority can be obtained based on the above data configuration table.
[0051] Step S510, judging whether the user has the operation authority of the data object according to the data authority. If yes, executing step S512; if no, executing step S514. The operation authority includes one or more of the following: adding authority, modifying authority, deleting authority and querying authority.
[0052] Assuming that the user performs a query operation on a data object, when the user accesses the query data interface of the server, the user's data ownership and data permissions and other configuration information will be obtained according to the user role and the data object to be accessed. If the data belongs to the department managed by the user, the list of departments managed by the user will be queried in the system organizational structure; if the data belongs to all subordinate departments of the department managed by the user, all subordinate departments of the department managed by the user will be queried in the system organizational structure; if the data belongs to the user, the data owned by the user will be queried in the system; if the data belongs to all, it means that all data can be viewed. After obtaining the user's data ownership and data permissions and other information, the data can be spliced into the query SQL (Structured Query Language) to verify whether the user has the viewing operation permission for the data object. In addition, if new data ownership is added later, the data permissions can also be verified in the same way. For example: multiple sales follow up the same customer, multiple sales can share customer data, and the newly added data belongs to the sales team in which the user participates. Based on the identification of the sales team, the system can obtain a list of customer IDs that can be viewed by the salesperson, and then splice the customer ID list into the query SQL to verify the customer data under the sales team that can be viewed by the salesperson.
[0053] Assume that a user performs a modification operation (or update operation) on a data object and calls the server's data modification interface. At this time, the server obtains the user's data ownership and data permissions, parses them into department data or customer data, and then verifies whether the user has modification permissions on the parsed data object. If so, the user is allowed to modify the data object. Otherwise, the user is prompted that it is not authorized.
[0054] Suppose a user deletes a data object and calls the server's data deletion interface. At this time, the server obtains the user's data ownership and data permissions, parses them into department data or customer data, and then verifies whether the user has the deletion permission for the parsed data object. If so, the user is allowed to delete the data object. Otherwise, the user is prompted that he is not authorized.
[0055] Suppose a user adds a new operation to a data object and calls the server's new data interface. At this time, the server obtains the user's data ownership and data permissions, parses them into department data or customer data, and then verifies whether the user has the permission to add new operations to the parsed data object. If so, the user is allowed to add new operations to the data object. Otherwise, the user is prompted that he is not authorized.
[0056] Step S512: operate the data object according to the operation authority.
[0057] Step S514, prompting the user that the user is not authorized.
[0058] In summary, the embodiment of the present invention fine-grains the permissions to the user role's new operation permissions, modification operation permissions, deletion operation permissions, and query operation permissions, and users can flexibly and conveniently configure data permissions, realizing the visualization of data permission configuration. In addition, the embodiment of the present invention verifies the user's operation permissions through each data operation interface, effectively improving the security of data operations.
[0059] For the data permission management method provided in the above embodiment, the present invention provides a data permission management device, which is applied to a server, and the server is configured with multiple data operation interfaces, see Figure 6 The structure diagram of a data authority management device shown in FIG. 1 mainly includes the following parts:
[0060] The interface determination module 602 is used to determine the target data operation interface corresponding to the data operation instruction from various data operation interfaces if a data operation instruction carrying a user identifier is received from the user.
[0061] The permission judgment module 604 is used to use the target data operation interface to judge whether the user has the operation permission corresponding to the target data operation interface based on the user identification and the pre-configured data configuration table; wherein the data configuration table includes the correspondence between the user role, the data object and the data permission, and the data permission is used to characterize the operation permission of the user role relative to the data object; the data operation interface corresponds to the operation permission one by one.
[0062] The object operation module 606 is used to operate the target data object corresponding to the target user role to which the user identifier belongs according to the operation authority corresponding to the target data operation interface when the judgment result of the authority judgment module is yes.
[0063] The above-mentioned data permission management device provided by the embodiment of the present invention determines the target data operation interface when receiving the data operation instruction sent by the user, and uses the target data operation interface to verify the user's operation permission based on the user identifier and data configuration table carried by the data operation instruction, effectively improving the problem of operation permission that cannot be verified quickly and conveniently in the prior art, thereby improving the security when operating data objects.
[0064] In one embodiment, the data configuration table also includes data ownership; data ownership is used to characterize the ownership relationship of the data object relative to the user role; the above-mentioned permission judgment module 604 is also used to: determine the target user role to which the user belongs based on the user identifier; use the target data operation interface to read the data configuration table to obtain the data ownership and data permissions corresponding to the target user role; based on the data ownership and data permissions corresponding to the target user role, determine whether the user has the operation permissions corresponding to the target data operation interface.
[0065] In one embodiment, the above-mentioned permission judgment module 604 is also used to: obtain the target data object corresponding to the target user role to which the user identifier belongs based on the data ownership corresponding to the target user role; determine whether the data permissions corresponding to the target data object include the operation permissions corresponding to the target data operation interface; if so, determine that the user has the operation permissions corresponding to the target data operation interface.
[0066] In one embodiment, the data operation instruction carries an operation identifier; the above-mentioned interface determination module 602 is also used to: determine the target data operation interface that matches the operation identifier carried by the data operation instruction based on the matching relationship between the pre-configured operation identifier and the data operation interface.
[0067] In one embodiment, the above-mentioned device also includes a configuration module, which is used to: display the roles to be configured, the objects to be configured, the affiliations to be configured, and the permissions to be configured through a specified interface, so that the user can configure and save the correspondence between the roles to be configured, the objects to be configured, the affiliations to be configured, and the permissions to be configured, and obtain a data configuration table.
[0068] In one embodiment, the device further comprises a prompt module for prompting the user that he cannot operate the target data object corresponding to the target user role to which the user identifier belongs if the user does not have the operation authority corresponding to the target data operation interface.
[0069] In one implementation, the data operation interface includes one or more of a new data interface, a modified data interface, a deleted data interface, and a query data interface.
[0070] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0071] An embodiment of the present invention provides a server. Specifically, the server includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned embodiments.
[0072] Figure 7 A structural diagram of a server provided in an embodiment of the present invention, the server 100 includes: a processor 70, a memory 71, a bus 72 and a communication interface 73, wherein the processor 70, the communication interface 73 and the memory 71 are connected via the bus 72; the processor 70 is used to execute an executable module stored in the memory 71, such as a computer program.
[0073] The memory 71 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 73 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0074] The bus 72 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0075] Among them, the memory 71 is used to store programs, and the processor 70 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 70 or implemented by the processor 70.
[0076] The processor 70 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 70. The above processor 70 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 71, and the processor 70 reads the information in the memory 71 and completes the steps of the above method in combination with its hardware.
[0077] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.
[0078] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0079] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data authority management method, characterized in that: The method is applied to a server, the server is configured with multiple data operation interfaces, and the method comprises: If a data operation instruction carrying a user identifier is received from a user, a target data operation interface corresponding to the data operation instruction is determined from each of the data operation interfaces; Using the target data operation interface, based on the user identifier and a pre-configured data configuration table, it is determined whether the user has the operation authority corresponding to the target data operation interface; wherein the data configuration table includes a correspondence between user roles, data objects and data authorities, and the data authorities are used to characterize the operation authority of the user role relative to the data object; the data operation interface corresponds to the operation authority one by one; If yes, operate the target data object corresponding to the target user role to which the user identifier belongs according to the operation authority corresponding to the target data operation interface; The data configuration table also includes data attribution; the data attribution is used to characterize the attribution relationship of the data object relative to the user role; The step of using the target data operation interface to determine whether the user has the operation authority corresponding to the target data operation interface based on the user identifier and the data configuration table includes: Determining a target user role to which the user belongs based on the user identifier; Using the target data operation interface, read the data configuration table to obtain the data ownership and data authority corresponding to the target user role; Based on the data ownership and data authority corresponding to the target user role, it is determined whether the user has the operation authority corresponding to the target data operation interface.
2. The method according to claim 1, characterized in that The step of judging whether the user has the operation authority corresponding to the target data operation interface based on the data ownership and data authority corresponding to the target user role includes: Based on the data attribution corresponding to the target user role, obtaining the target data object corresponding to the target user role to which the user identifier belongs; Determine whether the data permission corresponding to the target data object includes the operation permission corresponding to the target data operation interface; If yes, it is determined that the user has the operation authority corresponding to the target data operation interface.
3. The method according to claim 1, characterized in that The data operation instruction carries an operation identifier; The step of determining the target data operation interface corresponding to the data operation instruction from each of the data operation interfaces includes: Based on a matching relationship between a pre-configured operation identifier and a data operation interface, a target data operation interface matching the operation identifier carried by the data operation instruction is determined.
4. The method according to claim 1, characterized in that: The method further comprises: The roles to be configured, the objects to be configured, the affiliations to be configured and the permissions to be configured are displayed through a designated interface, so that the user configures and saves the corresponding relationship between the roles to be configured, the objects to be configured, the affiliations to be configured and the permissions to be configured, and obtains the data configuration table.
5. The method according to claim 1, characterized in that The method further comprises: If the user does not have the operation authority corresponding to the target data operation interface, the user is prompted that he cannot operate the target data object corresponding to the target user role to which the user identifier belongs.
6. The method according to claim 1, characterized in that The data operation interface includes one or more of a new data interface, a modification data interface, a deletion data interface and a query data interface.
7. A data authority management device, characterized in that: The device is applied to a server, the server is configured with multiple data operation interfaces, and the device includes: The interface determination module is used to determine the target data operation interface corresponding to the data operation instruction from each of the data operation interfaces if a data operation instruction carrying the user identification sent by the user is received; a permission judgment module, used to judge whether the user has the operation permission corresponding to the target data operation interface based on the user identification and a pre-configured data configuration table by using the target data operation interface; wherein the data configuration table includes a correspondence between user roles, data objects and data permissions, and the data permissions are used to characterize the operation permission of the user role relative to the data object; the data operation interface corresponds to the operation permission one by one; an object operation module, configured to operate the target data object corresponding to the target user role to which the user identifier belongs according to the operation authority corresponding to the target data operation interface when the judgment result of the authority judgment module is The data configuration table also includes data ownership; the data ownership is used to characterize the ownership relationship of the data object relative to the user role; the permission judgment module is also used to: determine the target user role to which the user belongs based on the user identifier; use the target data operation interface to read the data configuration table to obtain the data ownership and data permissions corresponding to the target user role; based on the data ownership and data permissions corresponding to the target user role, judge whether the user has the operation permissions corresponding to the target data operation interface.
8. A server, characterized in that: including a processor and a memory; A computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 6 is executed.
9. A computer storage medium, characterized in that: Used to store computer software instructions used for the method according to any one of claims 1 to 6.
