Permission configuration method, device, computer equipment and storage medium
By introducing a control permission configuration table in the permission management system, the permissions of the page control are determined according to the account level, the problem of granularity of traditional permission management is solved, and the permission management at the control level is realized, and configuration efficiency is improved.
Patent Information
- Application Number
- CN202111070451.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-09-13
AI Technical Summary
In traditional methods, permission management is relatively granular, making it difficult to achieve smaller granular permission control outside the page level.
By obtaining the permission configuration request for the page to be logged in, the page control is determined, and the corresponding relationship between the permission items of each page control recorded in the control permission configuration table and the account level is determined, and the account permissions for each page control are determined based on the target account level of the logged in account, and these permissions are sent to the terminal for configuration.
It realizes the management of control-level permissions, reduces the granularity of permission control, improves the flexibility and efficiency of permission configuration, and reduces the workload of developers.
Smart Images

Figure CN113742023B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a permission configuration method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology and the upgrading of various network permission requirements, account permission management frameworks exist in various web management systems to manage the account permissions of login accounts.
[0003] In the traditional way, the management of account permissions is usually to define the authorization content of the account based on the account role in the database. In this way, the permission control granularity is large, usually for page-level permissions, and it is difficult to achieve smaller granular permission control. Summary of the invention
[0004] Based on this, it is necessary to provide a permission configuration method, device, computer equipment and storage medium that can reduce the granularity of page permission management in response to the above technical problems.
[0005] A permission configuration method, applied to a server, comprising:
[0006] Obtain a permission configuration request for the page to be logged in, which carries page information of the page to be logged in and account information of the login account;
[0007] According to the page information, determine the page control corresponding to the page to be logged in;
[0008] Obtain a control permission configuration table, which includes the correspondence between each permission item of each page control and each account level;
[0009] Based on the account information, determine the target account level of the login account;
[0010] Determine the account permissions of the login account for each page control based on the corresponding relationship and the target account level;
[0011] The permissions of each account are sent to the terminal, and the permissions of each page control of each page to be logged in are configured through the terminal.
[0012] In one embodiment, the method further comprises:
[0013] Receive a permission opening request from a terminal, the permission opening request carrying a control identifier of a target page control for which permission opening is requested, a target permission for which opening is requested, and an account identifier of a login account;
[0014] Determine whether the permission granting request is approved;
[0015] When the permission opening request is approved, the target permission of the target control is opened to the login account, and a corresponding relationship between the account ID and the target permission of the target control is established in the control permission configuration table.
[0016] A permission configuration method, applied to a terminal, comprising:
[0017] Receive an account login request, which carries the account information of the login account and the page information of the page to be logged in;
[0018] Get each page control corresponding to the page to be logged in;
[0019] Generate a corresponding permission configuration request based on the account information and page information, and send the permission configuration request to the server;
[0020] The account authority of each page control of the login page for the login account fed back by the server is received, and the authority of each page control of the login page is configured according to the authority of each account.
[0021] In one embodiment, obtaining each page control corresponding to the page to be logged in includes:
[0022] According to the control identification script pre-configured on the page to be logged in, the page controls of the page to be logged in are identified to obtain the page controls of the page to be logged in.
[0023] In one embodiment, the permissions of each page control of the login page are configured according to the permissions of each account, including:
[0024] According to the account permissions of each page control fed back by the server, determine the control identifier of each page control whose permissions are to be configured;
[0025] Based on each control identifier, query each page control of the acquired page to be logged in, and obtain each page control to be configured whose permissions are to be configured;
[0026] Configure the control permissions of each page control to be configured as the account permissions reported by the corresponding server.
[0027] In one embodiment, the method further comprises:
[0028] Send a permission opening request to the server, the permission opening request carries the control identifier of the target page control for which permission is requested to be opened, the target permission requested to be opened, and the account identifier of the login account;
[0029] Receive the request passed instruction fed back by the server, and based on the request passed instruction, configure the permissions of the target page controls through the target permissions.
[0030] A permission configuration device, applied to a server, comprising:
[0031] The permission configuration request acquisition module is used to obtain the permission configuration request for the login page to be logged in, and the permission configuration request carries the page information of the page to be logged in and the account information of the login account;
[0032] A page control determination module is used to determine the page control corresponding to the page to be logged in according to the page information;
[0033] A control permission configuration table acquisition module is used to acquire a control permission configuration table, which includes the correspondence between each permission item of each page control and each account level;
[0034] A target account level determination module, used to determine the target account level of the login account based on the account information;
[0035] The permission determination module is used to determine the account permissions of the login account for each page control according to the corresponding relationship and the target account level;
[0036] The permission configuration module is used to send the permissions of each account to the terminal, and configure the permissions of each page control of each page to be logged in through the terminal.
[0037] A permission configuration device, applied to a terminal, comprising:
[0038] An account login request receiving module is used to receive an account login request, wherein the account login request carries the account information of the login account and the page information of the page to be logged in;
[0039] The page control acquisition module is used to obtain each page control corresponding to the page to be logged in;
[0040] A permission configuration request generation module is used to generate a corresponding permission configuration request based on account information and page information, and send the permission configuration request to the server;
[0041] The permission determination and configuration module is used to receive the account permission of the login account for each page control of the login page fed back by the server, and configure the permission of each page control of the login page according to the permission of each account.
[0042] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.
[0043] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of the above embodiments.
[0044] The above-mentioned permission configuration method, device, computer equipment and storage medium obtain a permission configuration request for the page to be logged in, the permission configuration request carries the page information of the page to be logged in and the account information of the login account, and according to the page information, determines the page control corresponding to the page to be logged in, and then obtains the control permission configuration table, the control permission configuration table includes the correspondence between each permission item of each page control and each account level, and based on the account information, determines the target account level of the login account, further determines the account permission of the login account to each page control according to the correspondence and the target account level, and sends each account permission to the terminal, and configures the permission of each page control of each page to be logged in through the terminal. Thus, based on the request of the terminal, the page control of the page to be logged in and the target account level of the login account can be determined, and the account permission of each page control in the page to be logged in corresponding to the target account level can be determined according to the control permission configuration table, and then sent to the terminal to configure the permission of each page control of each page to be logged in. Compared with the traditional method of managing the page-level permission, the present application scheme can realize the control of the control-level permission, reducing the granularity of the permission control. Moreover, you only need to configure the correspondence between each permission item of each page control and each account level through the control permission configuration table, and you can configure the permissions of the page controls in subsequent applications without the need for developers to write a large amount of code programs to configure the control permissions, which can reduce the workload of developers and improve development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 An application scenario diagram of a permission configuration method in an embodiment;
[0046] Figure 2 A schematic diagram of a flowchart of a method for configuring permissions in an embodiment;
[0047] Figure 3 A flowchart of a method for configuring permissions in another embodiment;
[0048] Figure 4 A structural block diagram of a permission configuration device in an embodiment;
[0049] Figure 5 It is a structural block diagram of a permission configuration device in another embodiment;
[0050] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] The permission configuration method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 receives the account login request, and generates a permission configuration request for the login page based on the account login request, and sends it to the server 104. Among them, the permission configuration request carries the page information of the page to be logged in and the account information of the login account. After obtaining the permission configuration request for the page control of the login page, the server 104 can determine the page control corresponding to the login page according to the page information, and obtain the control permission configuration table, which includes the corresponding relationship between each permission item of each page control and each account level. Further, the server 104 can determine the target account level of the login account based on the account information, and determine the account permission of the login account to each page control according to the corresponding relationship and the target account level, and then send each account permission to the terminal, and configure the permission of each page control of each page to be logged in through the terminal. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented with an independent server or a server cluster composed of multiple servers.
[0053] In one embodiment, Figure 2 As shown, a permission configuration method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0054] Step S202: obtaining a permission configuration request for the page to be logged in, wherein the permission configuration request carries page information of the page to be logged in and account information of the login account.
[0055] The page to be logged in refers to the page where the user logs in through the account information. The page to be logged in may include multiple page controls, for example, controls corresponding to different page control functions such as adding, deleting, modifying, and editing, and may also include some controls corresponding to specific business needs.
[0056] In this embodiment, the permission configuration request refers to a request for configuring the permission of the page control in the page to be logged in. The page control request may carry the page information of the page to be logged in and the account information of the login account.
[0057] Specifically, the page information may refer to the page number, for example, the URL (Uniform Resource Locator) of the page to be logged in, etc. The account information may include information such as the account name, account number, or account ID.
[0058] In this embodiment, the user can enter the account name and password on the login page of the terminal, and the account name and password are paired through the terminal. When it is determined that the account name and password are paired, a permission configuration request is generated based on the user and the page information of the corresponding login page, and sent to the server so that the server can perform subsequent processing operations.
[0059] Step S204: determining the page control corresponding to the page to be logged in according to the page information.
[0060] In this embodiment, the server may query the page to be logged in according to the page information to determine the page control corresponding to the page to be logged in.
[0061] In this embodiment, the server can traverse the page to be logged in through a query script pre-configured on the page to be logged in to determine all page controls corresponding to the page to be logged in. For example, through the permission management application programming interface (Application Programming Interface, API), access the page library of the page to be logged in to determine the page controls corresponding to the page to be logged in.
[0062] Step S206, obtaining a control permission configuration table, wherein the control permission configuration table includes a correspondence between each permission item of each page control and each account level.
[0063] Among them, the control permission configuration table refers to a table that configures the correspondence between each permission item of each page control and the account level. It can specifically be a data table or a database, and this application does not impose any restrictions on this.
[0064] In this embodiment, the permission item refers to the item of configurable permissions for each page control, for example, it may include but is not limited to items such as control hiding, control control being controllable or control read-only, etc. The account level refers to the permission level of each login account, for example, it may be Level 1, Level 2, Level 3, etc.
[0065] In this embodiment, the server can configure the correspondence between each permission item of each page control and the account level through the control permission configuration table. For example, for account level Level 1, its permissions for page control 1, page control 2 and page control 3 are all control controllable. For account level Level 2, its permission for page control 1 is controllable, its permission for page control 2 is control read-only, and its permission for page control 3 is control hidden. For account level Level 3, its permission for page control 1 is control read-only, its permission for page control 2 is control hidden, and its permission for page control 3 is control hidden. It can be understood by those skilled in the art that this is only an example. In actual applications, the page controls of the page to be logged in are far more than 3 page controls, and the correspondence between page controls and user levels is not all as described above, and this application does not limit this.
[0066] In this embodiment, each page control can be identified by a corresponding control id, for example, id1 identifies page control 1, id2 identifies page control 2, and id3 identifies page control 3.
[0067] Step S208: Determine the target account level of the login account based on the account information.
[0068] Specifically, the server may query the user account level data table according to the account information of the login account to determine the target account level of the login user.
[0069] Step S210, determining the account authority of the login account for each page control according to the corresponding relationship and the target account level.
[0070] Specifically, the server can determine the account permissions of the login account for each page control based on the correspondence between the permission items of each page control configured in the control permission configuration table and the account levels, as well as the corresponding target account levels. For example, if the target user level is Level 1, then the permissions for page control 1, page control 2, and page control 3 are all control-controllable, and the account permissions for page control 1, page control 2, and page control 3 are all control-controllable.
[0071] Step S212, sending the permissions of each account to the terminal, and configuring the permissions of each page control of each page to be logged in through the terminal.
[0072] In this embodiment, after determining the account permissions of the login account for each page control, the server can send the obtained account permissions to the terminal, so that the terminal can fully configure each page control on the login page and render the page to be logged in.
[0073] Specifically, the server may construct a Javascript script code and then send it to the terminal, so that the terminal configures permissions for corresponding page controls based on the Javascript script code and according to the determined permissions of each account.
[0074] In the above-mentioned permission configuration method, by obtaining a permission configuration request for the page to be logged in, the permission configuration request carries the page information of the page to be logged in and the account information of the login account, and according to the page information, the page control corresponding to the page to be logged in is determined, and then the control permission configuration table is obtained, the control permission configuration table includes the correspondence between each permission item of each page control and each account level, and based on the account information, the target account level of the login account is determined, and further according to the correspondence and the target account level, the account permission of the login account to each page control is determined, and each account permission is sent to the terminal, and the permission of each page control of each page to be logged in is configured through the terminal. Thus, based on the request of the terminal, the page control of the page to be logged in and the target account level of the login account can be determined, and the account permission of each page control in the page to be logged in corresponding to the target account level can be determined according to the control permission configuration table, and then sent to the terminal to configure the permission of each page control of each page to be logged in. Compared with the traditional method of managing the page-level permission, the present application scheme can realize the control of the control-level permission, reducing the granularity of the permission control. Moreover, you only need to configure the correspondence between each permission item of each page control and each account level through the control permission configuration table, and you can configure the permissions of the page controls in subsequent applications without the need for developers to write a large amount of code programs to configure the control permissions, which can reduce the workload of developers and improve development efficiency.
[0075] In one of the embodiments, the above method may also include: receiving a permission activation request from a terminal, the permission activation request carrying a control identifier of a target page control for which permission is requested, a target permission requested, and an account identifier of a login account; determining whether the permission activation request is approved; when the permission activation request is approved, enabling the target permission of the target control to the login account, and establishing a correspondence between the account identifier and the target permission of the target control in a control permission configuration table.
[0076] Among them, the permission activation request refers to a request to activate the permission items that have not been activated for the page control for the login account. For example, for page control 1, the login account only has read permission. The user can generate a permission activation request through the terminal and send it to the server to request the activation of controllable permissions, etc.
[0077] In this embodiment, the server can parse the permission activation request based on the received permission activation request to parse out the permission identifier of the permission to be activated, the target permission requested to be activated, and the account identifier of the login account carried in the permission activation request.
[0078] Furthermore, the server may forward the received permission opening request to the permission review terminal for review, so as to determine whether to open the corresponding permission through the review terminal.
[0079] In this embodiment, after forwarding the permission opening request to the permission audit terminal, the server may monitor the permission audit terminal in real time to monitor and determine whether the permission opening audit is passed.
[0080] In this embodiment, when the server determines that the permission opening request is approved, the server can open the target permission of the target control to the login account, generate a correspondence between the account identifier of the login account and the target permission of the target control, and write it into the control permission configuration table.
[0081] In the above embodiment, by receiving the permission opening request of the terminal, when the permission opening request is approved, the target permission of the target control is opened to the login account, and the permission of the login account to each page control can be configured in a more flexible way, which can reduce the workload of developers and improve processing efficiency.
[0082] In one embodiment, if Figure 3 As shown, another permission configuration method is provided, which is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0083] Step S302: receiving an account login request, wherein the account login request carries account information of the login account and page information of the page to be logged in.
[0084] The account login request is a request for logging into the account after the user enters the account name and password of the login account into the login interface of the terminal. The request information refers to the account name and password of the login account. The page information refers to the page information of the login account to be logged in, for example, it may include but is not limited to the page identification, page ID or page number and other information.
[0085] In this embodiment, after receiving the account login request, the terminal can pair the input account name and password, and perform subsequent processing after the pairing is successful. Among them, each account name corresponds to only one password, and pairing refers to the process of verifying whether the account name and password are consistent or corresponding, so as to avoid invalid account login and ensure system security.
[0086] Step S304, obtaining each page control corresponding to the page to be logged in.
[0087] As mentioned above, the page to be logged in may include multiple page controls corresponding to different page functions, such as adding, deleting, modifying, editing, etc.
[0088] In this embodiment, after receiving the account login request and verifying the pairing of the account name and password, the terminal can obtain all page controls of the page to be logged in.
[0089] In this embodiment, the page controls of the page to be logged in obtained by the terminal may also be only the page controls that need to be configured with control permissions in a certain page area. For example, in a certain page, it includes general controls and controls related to specific business. General controls can be back, forward, previous page, next page, etc., and business-related controls can be added, deleted, modified, edited, downloaded, uploaded, etc. as described above. For general controls, it can be set to be operable by any account, so the terminal does not need to obtain them, and for business-related controls, the terminal can traverse the fixed page area to obtain such page controls.
[0090] Step S306: Generate a corresponding permission configuration request based on the account information and the page information, and send the permission configuration request to the server.
[0091] The permission configuration request refers to a request for permission configuration of a page control in a page to be logged in. The page control request may carry page information of the page to be logged in and account information of the login account.
[0092] In this embodiment, after obtaining the account login request, the terminal can generate a corresponding permission configuration request according to the account information and page information carried in the account login request, and send it to the server to request permission configuration for the page control to be configured.
[0093] Step S308, receiving the account authority of the login account for each page control of the login page fed back by the server, and configuring the authority of each page control of the login page according to the authority of each account.
[0094] Among them, account permissions refer to the permissions that the logged-in account has on the page controls, for example, editable and controllable permissions on the editing space, downloadable and controllable permissions on the download controls, or only read permissions on the delete controls, etc.
[0095] In this embodiment, after the terminal sends the permission configuration request to the server, the server can determine the target account level of the login account based on the account information, and determine the page control corresponding to the page to be logged in based on the page information, and determine the account permissions that the login account has for each page control based on the target account level of the login account, and then send it to the server. The specific server processing process can be found in the above description, which will not be repeated here.
[0096] In the above embodiment, by receiving an account login request, the account login request carries the account information of the login account and the page information of the page to be logged in, then obtaining each page control of the corresponding page to be logged in, and based on the account information and the page information, generating a corresponding permission configuration request, and sending the permission configuration request to the server, further receiving the account permissions of the login account for each page control of the login page fed back by the server, and configuring the permissions of each page control of the login page according to each account permission. Thus, when the account is logged in, the account permissions of each page control can be obtained from the server only based on the account information and the page information, and then the control permissions of each page control are configured respectively, which can realize the control of the control level permissions and reduce the granularity of the permission control. In addition, by obtaining the account permissions of each page control from the server, and then configuring the control permissions of each page control respectively, compared with the traditional method of configuring the permissions of each page control of the login page by the developer, the workload of the developer can be reduced and the development processing efficiency can be improved.
[0097] In one embodiment, obtaining each page control corresponding to the page to be logged in may include: identifying the page control of the page to be logged in according to a control identification script pre-configured on the page to be logged in, so as to obtain each page control of the page to be logged in.
[0098] In this embodiment, when developing a page, the developer may add a control identification script to the page in advance to facilitate the subsequent identification of page controls.
[0099] Specifically, the terminal may traverse the page to be logged in based on the control recognition script to obtain each page control in the page to be logged in.
[0100] In one of the embodiments, configuring permissions for each page control of the login page according to the permissions of each account can include: determining the control identifier of each page control whose permissions are to be configured according to the account permissions of each page control fed back by the server; based on each control identifier, querying each page control of the login page obtained, and obtaining each page control to be configured whose permissions are to be configured; configuring the control permissions of each page control to be configured to the account permissions fed back by the corresponding server.
[0101] In this embodiment, after receiving the account authority of the login account for each page control fed back by the server, the terminal can obtain the control identification of each page control, for example, the control ID.
[0102] Furthermore, the terminal may query the acquired page controls of the to-be-logged-in page according to the control identifiers to obtain page controls corresponding to the control identifiers, that is, obtain the to-be-configured page controls whose permissions are to be configured.
[0103] Furthermore, the server can configure the control permissions of each page control to be configured as the account permissions fed back by the corresponding server. Specifically, the control id and the corresponding account permissions can be an array consisting of two numbers, and the terminal can query the page control to be configured by the number corresponding to the control id in the array, and after finding it, configure the page control to be configured according to the other number in the array to obtain the page control after the permission is configured.
[0104] In this embodiment, each page control can be set with an initial permission, for example, uniformly set to hide the control. After receiving the account permissions of each page control, the terminal can determine whether the initial permissions of each page control are consistent with the received account permissions to be configured. If they are consistent, the page control is not processed. If they are inconsistent, the control permissions of each page control to be configured are configured as the account permissions fed back by the corresponding server, thereby reducing unnecessary permission configuration and saving terminal system resource consumption.
[0105] In the above embodiment, by determining the control identifier of each page control for which permissions are to be configured, and then based on each control identifier, querying each page control of the page to be logged in, and obtaining each page control to be configured for which permissions are to be configured, and configuring permissions, the search and configuration of permissions to be configured can be made more accurate, and the accuracy of permission configuration can be improved.
[0106] In one of the embodiments, the above method may also include: sending a permission activation request to the server, the permission activation request carrying the control identifier of the target page control for which the permission is requested, the target permission requested, and the account identifier of the login account; receiving the request approval instruction fed back by the server, and based on the request approval instruction, configuring the permission of the target page control through the target permission.
[0107] Among them, the permission opening request refers to a request to open the permission items that have not been opened for the page controls for the logged-in account, and a request to open the controllable permission of the logged-in account for the page space, etc.
[0108] In this embodiment, after the user logs in to the login page through an account, he can operate the page controls with controllable permissions on the login page. For read-only controls, the user can generate a permission activation request through the terminal and send it to the server to request activation of the corresponding permission item.
[0109] Specifically, after completing the permission configuration of the page control, the terminal can render and display the page to be logged in. When the page is rendered, a hidden "permission application" floating button icon will be added to the read-only control. When the user places the mouse focus on the read-only control for more than 3 seconds, the floating icon corresponding to the read-only control can be displayed. When the user clicks the icon, the terminal can generate a permission activation request to send a permission activation request to the server administrator to request permission for the read-only control.
[0110] In this embodiment, the permission opening request may include three parameters, parameter 0 is the account of the current login account, parameter 1 is the page URL address of the current page, and parameter 2 is the control id. After receiving the permission opening request, the server can query the three parameters to display which user applies for the permission of which control, and send it to the permission management terminal for display, so as to request the corresponding permission to be opened.
[0111] Furthermore, when the administrator approves the application through the authority management terminal, the server can generate a request approval instruction and send it to the terminal.
[0112] In this embodiment, after receiving the request pass instruction, the terminal can configure the target page control with the target permission, and after the terminal refreshes the page, it can obtain the permission to display the activation to the user. At the same time, the server can generate the corresponding relationship between the account identifier of the login account and the target permission of the target control, and write it into the control permission configuration table.
[0113] In the above embodiment, a permission opening request is sent to the server to request the target permission of the target page control to be opened for the logged-in user, and after receiving the request approval instruction fed back by the server, the target page control is configured with the target permission based on the request approval instruction. The permissions of the logged-in account to each page control can be configured in a more flexible manner without the need for developers to rewrite code files to open permissions, which can reduce the workload of developers and thus improve processing efficiency.
[0114] It should be understood that although Figure 2 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0115] In one embodiment, Figure 4 As shown, a permission configuration device is provided, including: a permission configuration request acquisition module 401, a page control determination module 402, a control permission configuration table acquisition module 403, a target account level determination module 404, a permission determination module 405 and a permission configuration module 406, wherein:
[0116] The permission configuration request acquisition module 401 is used to acquire the permission configuration request for the page to be logged in. The permission configuration request carries the page information of the page to be logged in and the account information of the login account.
[0117] The page control determination module 402 is used to determine the page control corresponding to the page to be logged in according to the page information.
[0118] The control permission configuration table acquisition module 403 is used to acquire the control permission configuration table, which includes the correspondence between each permission item of each page control and each account level.
[0119] The target account level determination module 404 is used to determine the target account level of the login account based on the account information.
[0120] The authority determination module 405 is used to determine the account authority of the login account for each page control according to the corresponding relationship and the target account level.
[0121] The permission configuration module 406 is used to send the permission of each account to the terminal, and configure the permission of each page control of each page to be logged in through the terminal.
[0122] In one embodiment, the above device may further include:
[0123] The permission opening request receiving module is used to receive the permission opening request of the terminal, and the permission opening request carries the control identifier of the target page control for which the permission opening is requested, the target permission requested for opening, and the account identifier of the login account.
[0124] The judgment module is used to judge whether the permission opening request is approved.
[0125] The permission opening module is used to open the target permission of the target control to the login account when the permission opening request is approved, and establish a corresponding relationship between the account identifier and the target permission of the target control in the control permission configuration table.
[0126] In one embodiment, if Figure 5 As shown, another permission configuration device is provided, including: an account login request receiving module 501, a page control acquisition module 502, a permission configuration request generating module 503 and a permission determination and configuration module 504, wherein:
[0127] The account login request receiving module 501 is used to receive an account login request, which carries the account information of the login account and the page information of the page to be logged in.
[0128] The page control acquisition module 502 is used to acquire each page control corresponding to the page to be logged in.
[0129] The permission configuration request generation module 503 is used to generate a corresponding permission configuration request based on the account information and the page information, and send the permission configuration request to the server.
[0130] The authority determination and configuration module 504 is used to receive the account authority of the login account for each page control of the login page fed back by the server, and configure the authority of each page control of the login page according to the authority of each account.
[0131] In one embodiment, the page control acquisition module 502 is used to identify the page controls of the page to be logged in according to the control identification script pre-configured on the page to be logged in, so as to obtain the page controls of the page to be logged in.
[0132] In one embodiment, the permission determination and configuration module 504 may include:
[0133] The control identifier determination submodule is used to determine the control identifier of each page control whose permissions are to be configured according to the account permissions of each page control fed back by the server.
[0134] The query submodule is used to query each page control of the acquired page to be logged in based on each control identifier, and obtain each page control to be configured whose permissions are to be configured.
[0135] The permission configuration submodule is used to configure the control permissions of each page control to be configured as the account permissions fed back by the corresponding server.
[0136] In one embodiment, the above device may further include:
[0137] The permission opening request sending module is used to send the permission opening request to the server. The permission opening request carries the control identifier of the target page control for which the permission is requested to be opened, the target permission requested to be opened, and the account identifier of the login account.
[0138] The permission configuration module is used to receive the request passing instruction fed back by the server, and based on the request passing instruction, perform permission configuration on the target page control through the target permission.
[0139] For the specific limitations of the permission configuration device, please refer to the limitations of the permission configuration method above, which will not be repeated here. Each module in the above-mentioned permission configuration device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0140] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as permission configuration requests, page controls, corresponding relationships, target account levels, and account permissions of the login account to each page control. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a permission configuration method is implemented.
[0141] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0142] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: obtaining a permission configuration request for a page to be logged in, the permission configuration request carrying page information of the page to be logged in and account information of the login account; determining a page control corresponding to the page to be logged in according to the page information; obtaining a control permission configuration table, the control permission configuration table including a correspondence between each permission item of each page control and each account level; determining a target account level of the login account based on the account information; determining the account permission of the login account for each page control according to the correspondence and the target account level; sending each account permission to a terminal, and configuring the permission of each page control of each page to be logged in through the terminal.
[0143] In one of the embodiments, the processor can also implement the following steps when executing the computer program: receiving a permission activation request from a terminal, the permission activation request carrying a control identifier of a target page control for which permission is requested, a target permission requested, and an account identifier of a login account; determining whether the permission activation request is approved; when the permission activation request is approved, enabling the target permission of the target control to the login account, and establishing a correspondence between the account identifier and the target permission of the target control in a control permission configuration table.
[0144] In one embodiment, another computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: receiving an account login request, the account login request carrying account information of the login account and page information of the page to be logged in; obtaining each page control corresponding to the page to be logged in; generating a corresponding permission configuration request based on the account information and the page information, and sending the permission configuration request to a server; receiving the account permission of the login account for each page control of the login page fed back by the server, and configuring the permission of each page control of the login page according to the permission of each account.
[0145] In one embodiment, when the processor executes a computer program, obtaining each page control corresponding to the page to be logged in can include: identifying the page control of the page to be logged in according to a control identification script pre-configured on the page to be logged in, so as to obtain each page control of the page to be logged in.
[0146] In one of the embodiments, when the processor executes the computer program, it implements the configuration of permissions for each page control of the login page according to the permissions of each account, which may include: determining the control identifier of each page control whose permissions are to be configured according to the account permissions of each page control fed back by the server; based on each control identifier, querying each page control of the login page obtained, and obtaining each page control to be configured whose permissions are to be configured; configuring the control permissions of each page control to be configured to the account permissions fed back by the corresponding server.
[0147] In one of the embodiments, the processor can also implement the following steps when executing the computer program: sending a permission activation request to the server, the permission activation request carries the control identifier of the target page control for which the permission is requested, the target permission requested, and the account identifier of the login account; receiving the request approval instruction fed back by the server, and based on the request approval instruction, configuring the permission of the target page control through the target permission.
[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining a permission configuration request for a page to be logged in, the permission configuration request carrying page information of the page to be logged in and account information of the login account; determining a page control corresponding to the page to be logged in according to the page information; obtaining a control permission configuration table, the control permission configuration table including a correspondence between each permission item of each page control and each account level; determining a target account level of the login account based on the account information; determining the account permission of the login account for each page control according to the correspondence and the target account level; sending each account permission to a terminal, and configuring the permission of each page control of each page to be logged in through the terminal.
[0149] In one of the embodiments, when the computer program is executed by the processor, the following steps can also be implemented: receiving a permission activation request from a terminal, the permission activation request carrying a control identifier of a target page control for which permission is requested, a target permission requested, and an account identifier of a login account; determining whether the permission activation request has been approved; when the permission activation request has been approved, enabling the target permission of the target control to the login account, and establishing a correspondence between the account identifier and the target permission of the target control in a control permission configuration table.
[0150] In one embodiment, another computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: receiving an account login request, the account login request carrying account information of the login account and page information of the page to be logged in; obtaining each page control corresponding to the page to be logged in; based on the account information and the page information, generating a corresponding permission configuration request, and sending the permission configuration request to a server; receiving the account permissions of the login account for each page control of the login page fed back by the server, and configuring permissions for each page control of the login page according to the permissions of each account.
[0151] In one of the embodiments, when the computer program is executed by the processor, obtaining each page control corresponding to the page to be logged in can include: identifying the page controls of the page to be logged in according to a control identification script pre-configured on the page to be logged in, so as to obtain each page control of the page to be logged in.
[0152] In one of the embodiments, when the computer program is executed by the processor, permissions for each page control of the login page to be configured according to the permissions of each account, which may include: determining the control identifier of each page control whose permissions are to be configured according to the account permissions of each page control fed back by the server; based on each control identifier, querying each page control of the login page to be obtained, and obtaining each page control to be configured whose permissions are to be configured; configuring the control permissions of each page control to be configured to the account permissions fed back by the corresponding server.
[0153] In one of the embodiments, when the computer program is executed by the processor, the following steps can also be implemented: sending a permission activation request to the server, the permission activation request carries the control identifier of the target page control for which the permission is requested to be activated, the target permission requested to be activated, and the account identifier of the login account; receiving the request approval instruction fed back by the server, and based on the request approval instruction, configuring the target page control with the target permission.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0155] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0156] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A permission configuration method, characterized in that: Applied to a server, the method comprises: Obtaining a permission configuration request for a page to be logged in, wherein the permission configuration request carries page information of the page to be logged in and account information of a login account; Determine, according to the page information, a page control corresponding to the page to be logged in; the page control is obtained by identifying the page control of the page to be logged in based on a control identification script pre-configured on the page to be logged in; the page control includes a business-related control; the business-related control is obtained by the terminal traversing a fixed page area of the page to be logged in; Obtain a control permission configuration table, wherein the control permission configuration table includes a correspondence between each permission item of each page control and each account level; the permission item is an item of configurable permission of the page control; the permission item includes at least one item of control hiding, control control being controllable, and control read-only; Based on the account information, determining a target account level for the login account; Determining the account authority of the login account for each of the page controls according to the corresponding relationship and the target account level; Sending each of the account permissions to the terminal, and configuring permissions for each of the page controls of each of the pages to be logged in through the terminal; including: determining, through the terminal, the control identifiers of each of the page controls whose permissions are to be configured according to the account permissions of each of the page controls fed back by the server; querying each of the page controls of the pages to be logged in obtained based on each of the control identifiers, and obtaining each of the page controls to be configured whose permissions are to be configured; configuring the control permissions of each of the page controls to be configured to the account permissions fed back by the corresponding server; Among them, the control identification includes a control id; the control id and the corresponding account authority are an array consisting of two numbers; specifically including: the terminal queries the page control to be configured through the number corresponding to the control id in the array, and after finding it, configures the page control to be configured according to another number in the array to obtain the page control after the authority is configured.
2. The method according to claim 1, characterized in that The method further comprises: Receiving a permission opening request from a terminal, the permission opening request carrying a control identifier of a target page control for which permission opening is requested, a target permission for which opening is requested, and an account identifier of the login account; Determine whether the permission granting request is approved; When the permission opening request is approved, the target permission of the target page control is opened to the login account, and a corresponding relationship between the account identifier and the target permission of the target page control is established in the control permission configuration table.
3. A permission configuration method, characterized in that: Applied to a terminal, the method comprises: Receive an account login request, wherein the account login request carries account information of the login account and page information of the page to be logged in; Acquiring each page control corresponding to the page to be logged in, comprising: identifying the page control of the page to be logged in according to a control identification script pre-configured on the page to be logged in, so as to acquire each page control of the page to be logged in; The page controls include business-related controls, specifically including: traversing the fixed page area of the page to be logged in to obtain the business-related controls; Based on the account information and the page information, a corresponding permission configuration request is generated, and the permission configuration request is sent to the server; the permission configuration request is used to instruct the server to obtain a control permission configuration table, wherein the control permission configuration table includes a correspondence between each permission item of each page control and each account level; the permission item is an item of configurable permission for the page control; the permission item includes at least one item of control hiding, control control being controllable, and control read-only; based on the account information, a target account level of the login account is determined; according to the correspondence and the target account level, the account permission of the login account for each page control is determined; Receiving the account authority of the login account for each page control of the page to be logged in fed back by the server, and configuring the authority of each page control of the page to be logged in according to each account authority; including: determining the control identifier of each page control whose authority is to be configured according to the account authority of each page control fed back by the server; querying each page control of the page to be logged in obtained based on each control identifier, and obtaining each page control to be configured whose authority is to be configured; configuring the control authority of each page control to be configured to the account authority fed back by the corresponding server; Among them, the control identification includes a control id; the control id and the corresponding account authority are an array consisting of two numbers; specifically including: querying the page control to be configured through the number corresponding to the control id in the array, and after finding it, configuring the page control to be configured according to another number in the array to obtain the page control after the authority is configured.
4. The method according to claim 3, characterized in that The method further comprises: Sending a permission opening request to the server, wherein the permission opening request carries a control identifier of a target page control for which permission opening is requested, a target permission for which opening is requested, and an account identifier of the login account; A request passing instruction fed back by the server is received, and based on the request passing instruction, permission configuration is performed on the target page control through the target permission.
5. A permission configuration device, characterized in that: Applied to a server, the device comprises: The permission configuration request acquisition module is used to obtain the permission configuration request for the page to be logged in, wherein the permission configuration request carries the page information of the page to be logged in and the account information of the login account; A page control determination module, used to determine the page control corresponding to the page to be logged in according to the page information; the page control is obtained by identifying the page control of the page to be logged in based on a control identification script pre-configured on the page to be logged in; the page control includes a business-related control; the business-related control is obtained by the terminal traversing a fixed page area of the page to be logged in; A control permission configuration table acquisition module is used to acquire a control permission configuration table, wherein the control permission configuration table includes a correspondence between each permission item of each page control and each account level; the permission item is an item of configurable permission of the page control; the permission item includes at least one item of control hiding, control control being controllable, and control read-only; A target account level determination module, used to determine the target account level of the login account based on the account information; A permission determination module, used to determine the account permission of the login account to each of the page controls according to the corresponding relationship and the target account level; A permission configuration module, used to send the permissions of each account to the terminal, and configure the permissions of each page control of each page to be logged in through the terminal; The permission configuration module is specifically used to determine the control identifier of each page control whose permission is to be configured through the terminal according to the account permission of each page control fed back by the server; based on each control identifier, query each page control of the page to be logged in obtained, and obtain each page control to be configured whose permission is to be configured; configure the control permission of each page control to be configured to the account permission fed back by the corresponding server; Among them, the control identification includes a control id; the control id and the corresponding account authority are an array consisting of two numbers; the permission configuration module is specifically used to query the page control to be configured through the terminal according to the number corresponding to the control id in the array, and after finding it, configure the page control to be configured according to another number in the array to obtain the page control after permission configuration.
6. The device according to claim 5, characterized in that The device also includes: The permission opening request receiving module is used to receive the permission opening request of the terminal, wherein the permission opening request carries the control identifier of the target page control for which the permission opening is requested, the target permission for which the permission opening is requested, and the account identifier of the login account; A judgment module, used to judge whether the permission opening request is approved; The permission opening module is used to open the target permission of the target page control to the login account when the permission opening request is approved, and to establish a corresponding relationship between the account identifier and the target permission of the target page control in the control permission configuration table.
7. A permission configuration device, characterized in that: Applied to a terminal, the device comprises: An account login request receiving module, used to receive an account login request, wherein the account login request carries account information of the login account and page information of the page to be logged in; A page control acquisition module, used to acquire each page control corresponding to the page to be logged in; The page control acquisition module is specifically used to identify the page controls of the page to be logged in according to the control identification script pre-configured on the page to be logged in, so as to obtain each page control of the page to be logged in; The page controls include business-related controls, and the page control acquisition module is specifically used to traverse the fixed page area of the page to be logged in to acquire the business-related controls; A permission configuration request generation module is used to generate a corresponding permission configuration request based on the account information and the page information, and send the permission configuration request to the server; the permission configuration request is used to instruct the server to obtain a control permission configuration table, the control permission configuration table includes the correspondence between each permission item of each page control and each account level; the permission item is an item of configurable permission for the page control; the permission item includes at least one item of control hiding, control control being controllable, and control read-only; based on the account information, determine the target account level of the login account; according to the correspondence and the target account level, determine the account permission of the login account for each page control; A permission determination and configuration module, used for receiving the account permission of the login account for each page control of the page to be logged in fed back by the server, and configuring the permission of each page control of the page to be logged in according to each account permission; The permission determination and configuration module includes: The control identifier determination submodule is used to determine the control identifier of each page control whose permissions are to be configured according to the account permissions of each page control fed back by the server; A query submodule is used to query each page control of the acquired page to be logged in based on each control identifier, and obtain each page control to be configured whose permissions are to be configured; The permission configuration submodule is used to configure the control permissions of each page control to be configured as the account permissions fed back by the corresponding server; Wherein, the control identification includes a control id; the control id and the corresponding account authority are an array consisting of two numbers; The query submodule is specifically used to query the page control to be configured through the number corresponding to the control id in the array; The permission configuration submodule is specifically used to configure the page control to be configured according to another number in the array after the search, so as to obtain the page control after the permission is configured.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Access control method, client and server
CN104335523A