Method, device, equipment and storage medium for generating pages

By generating permission trees and establishing correspondence between user roles, the problems of complex permission management and inflexible page generation in the existing technology are solved, and the effects of rapid page generation and flexible permission management are achieved.

CN118094492BActive Publication Date: 2024-12-13QIJIAYOUDAO NETWORK TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410064110.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-16
Publication Date
2024-12-13
Estimated Expiration
2044-01-16

AI Technical Summary

Technical Problem

In the prior art, when managing and generating pages, the management of complex permissions is inconvenient, and the page generation is not fast enough when users and permissions change, making it difficult to achieve flexible permission access control.

Method used

By dividing business modules, determining page levels and functional units, generating permission trees, establishing correspondence between permission nodes and roles, and generating pages based on roles, realizing correspondence between users and roles, supporting permission inheritance and temporary role configuration, and combining department structure tree to reduce configuration workload.

Benefits of technology

It realizes the ability to generate pages quickly, simplifies permission management, enhances the convenience and accuracy of permission access control, and can quickly generate corresponding pages regardless of permissions or role changes, reducing workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118094492B_ABST
    Figure CN118094492B_ABST
Patent Text Reader

Abstract

The present disclosure is about a method and device for generating pages, which are used for quickly generating pages and facilitating permission management. The method includes: dividing business modules according to business needs; determining the level of the page and the functional units in the page according to the business process of each business module and the content of each business process; generating a permission tree according to the functional units in the page and the level of the page; wherein a functional unit corresponds to a permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same layer in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page; establishing a corresponding relationship between each permission node and the role according to business needs; establishing a corresponding relationship between the user and the role; generating a corresponding role page for the user according to the permission node corresponding to the role.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronics and computer processing, and in particular to a method and apparatus, device, and storage medium for generating a page. Background Art

[0002] Software systems are usually composed of pages, which implement various functions. These systems are often used by multiple people. For security reasons, different people, that is, different users, have different permissions. This requires generating corresponding pages for different permissions.

[0003] In the related art, the corresponding permissions are designed for different users first, and then the page is designed according to the permissions of each user. This method is not flexible enough. On the one hand, it is not convenient for the management of complex permissions. On the other hand, once the user and the permission change, it is not conducive to the rapid generation of the page. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method and apparatus, device, and storage medium for generating a page.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a method for generating a page, comprising:

[0006] Divide business modules according to business needs;

[0007] Determine the level of the page and the functional units in the page according to the business process of each business module and the content of each business process;

[0008] Generate a permission tree according to the functional units in the page and the level of the page; wherein one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same level in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page;

[0009] Establish the corresponding relationship between each permission node and role according to business needs;

[0010] Establish the corresponding relationship between users and roles;

[0011] Generate a corresponding role page for the user based on the permission node corresponding to the role.

[0012] In this embodiment, the level and function unit of the page are associated with the permission node, and the permission node is associated with the role and the user, so as to quickly generate the corresponding page for the user. Regardless of the increase or decrease of permissions, the increase or decrease of roles, or the increase or decrease of users, the corresponding page can be quickly generated. At the same time, it is convenient for permission access control.

[0013] In one embodiment, the method further includes: when two roles correspond to the same authority node, the authority node is located at a common parent authority node of the authority nodes corresponding to the two roles; or, two different identifiers are assigned to the same authority node, corresponding to the two roles respectively.

[0014] In this embodiment, the same permission nodes of the two roles are configured in a common parent permission node, so that both roles have the permission. Another way is to configure two same permission nodes for the two roles, which do not interfere with each other and facilitate permission management.

[0015] In one embodiment, a child authority node inherits the authority of a parent authority node.

[0016] In this embodiment, the closer to the root node, the looser the permission, and the easier it is to be inherited. This permission inheritance relationship is consistent with the page jump relationship, which is convenient for both page access and permission management.

[0017] In one embodiment, the method further includes: configuring a management scope for each authority node; configuring a management scope for each role, the management scope of the role being a collection of management scopes of corresponding authority nodes.

[0018] In this embodiment, a management scope is configured for each authority node, which can control not only the access rights of the functional units but also the access and processing rights of the data.

[0019] In one embodiment, the authority node includes, hierarchically from top to bottom, an authority abstraction unit, a return logic unit, and an entity unit;

[0020] The return value of the entity unit is sent to the return logic unit, and the return logic unit performs logical judgment on the return value.

[0021] In this embodiment, the permission node is divided into three units, especially the permission abstract unit and the return logic unit are separated, so as to facilitate the flexible expansion of business content.

[0022] In one embodiment, the method further includes: when a temporary role needs to be configured, configuring an entity unit of the authority node corresponding to the temporary role, and adding a return value and logic judgment of the entity unit in the return logic unit.

[0023] In this embodiment, this embodiment supports configuration of temporary roles, which can be easily implemented by returning logical units with minor changes.

[0024] In one embodiment, the method further comprises: obtaining a department structure tree;

[0025] The establishing of the corresponding relationship between the user and the role includes: establishing the corresponding relationship between the user of the leaf node department in the department structure tree and the role;

[0026] No corresponding relationship is established between roles and users in non-leaf node departments in the department structure tree.

[0027] In this embodiment, the department structure tree is combined with the authority and role structure tree, so there is no need to configure roles and authorities for all users in all departments, which greatly reduces the workload.

[0028] According to a second aspect of an embodiment of the present disclosure, there is provided an apparatus for generating a page, including:

[0029] Division modules are used to divide business modules according to business needs;

[0030] The page module is used to determine the level of the page and the functional units in the page according to the business process of each business module and the content of each business process;

[0031] The permission module is used to generate a permission tree according to the functional units in the page and the level of the page; wherein one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same level in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page;

[0032] The role module is used to establish the corresponding relationship between each permission node and the role according to business needs;

[0033] User module, used to establish the correspondence between users and roles;

[0034] The generation module is used to generate corresponding role pages for users according to the permission nodes corresponding to the roles.

[0035] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0036] at least one processor; and

[0037] a memory communicatively connected to the at least one processor; wherein,

[0038] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described.

[0039] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the described method.

[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 is a flow chart showing a method for generating a page according to an exemplary embodiment;

[0043] Figure 2 is a block diagram of a device for generating a page according to an exemplary embodiment;

[0044] Figure 3 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0046] Figure 1 is a flow chart of a method for generating a page according to an exemplary embodiment. Figure 1 As shown, the method can be implemented by a terminal, comprising the following steps:

[0047] In step 101, business modules are divided according to business requirements.

[0048] In step 102, the level of the page and the functional units in the page are determined with respect to the business process of each business module and the content of each business process.

[0049] In step 103, a permission tree is generated according to the functional units in the page and the level of the page; wherein, one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same layer in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page.

[0050] In step 104, a correspondence between each authority node and a role is established according to business requirements.

[0051] In step 105, a correspondence between users and roles is established.

[0052] In step 106, a corresponding role page is generated for the user according to the permission node corresponding to the role.

[0053] It should be noted that in the relevant technology, permissions are mainly divided into functional permissions and data permissions, functional permissions (interface permissions, menu permissions, operation permissions, etc.) and data permissions. Functional permissions can be viewed from different granularities, module level-page level-button level (interface level). The finer the functional granularity, the higher the complexity, and the more complicated the maintenance will be. For button (interface) level permissions, one interface can only implement one function. If there are multiple interfaces corresponding to one permission, the control of permissions will be inaccurate, and some uncontrollable permissions problems will arise. Data permissions refer to the data range that users have under a certain function. They can view data through this function, but they can only see data within their own permission range.

[0054] In this embodiment, a functional unit corresponds to a permission node in the permission tree. Business needs determine the association between functional units and permission nodes, which improves the convenience and accuracy of permission access control and facilitates the management of complex permissions. At the same time, by associating the level of the page and the functional unit with the permission node, multiple associated permissions can be organized into a tree data structure. The permission node is associated with roles and users, which facilitates the rapid generation of corresponding pages for users. Regardless of the increase or decrease of permissions, or the increase or decrease of roles, or the increase or decrease of users, the corresponding pages can be generated quickly and accurately. In addition, the scope of permissions is more clearly defined, which facilitates the troubleshooting of problems during later maintenance.

[0055] The user can configure at least one permission node and a role to form an association, and configure a role and a user to form an association. The permission tree can be implemented in the form of a table, including but not limited to a user table, a user and role association table, a role table, a role and permission node association table, and a permission table.

[0056] Here, a user may correspond to one or more roles, and a role may correspond to one or more permission nodes. For example, roles include but are not limited to administrator, technician, supervisor, and manager.

[0057] In the application scenario, for example, when a user logs in to access, the user's username is first obtained, and then the corresponding role is queried based on the username, and then the corresponding permission node is queried based on the role, and then the corresponding role page is generated based on the functional unit corresponding to the permission node.

[0058] In one embodiment, a method for generating a page further includes:

[0059] Step A: When two roles correspond to the same permission node, the permission node is located at the common parent permission node of the permission nodes corresponding to the two roles. For example, when role 1 and role 3 need to correspond to permission node 2 together, role 1 also needs to correspond to permission node 3. At this time, permission node 2 is the parent node of permission node 3. If the role corresponds to permission node 3, it will naturally inherit permission node 2. If role 3 corresponds to permission node 2, role 1 only needs to correspond to permission node 3 to inherit permission node 2.

[0060] In this embodiment, the same permission nodes of the two roles are configured in a common parent permission node, so that both roles have the permission.

[0061] In one embodiment, a method for generating a page further includes:

[0062] Step B: When two roles correspond to the same authority node, two different identifiers are assigned to the same authority node, corresponding to the two roles respectively. For example, when role 1 and role 3 need to correspond to authority node 2 together, identifier a and identifier b are assigned to authority node 2, role 1 corresponds to identifier a, and role 3 corresponds to identifier b.

[0063] In this embodiment, two identical permission nodes are configured for two roles so that they do not interfere with each other, thereby facilitating permission management.

[0064] In this embodiment, when two roles correspond to the same authority node, they can be configured in one of the two ways mentioned above.

[0065] In one embodiment, a child authority node inherits the authority of a parent authority node.

[0066] In this embodiment, the closer to the root node, the looser the permission, and the easier it is to be inherited. This permission inheritance relationship is consistent with the page jump relationship, which is convenient for both page access and permission management.

[0067] In one embodiment, a method for generating a page further includes: configuring a management scope for each authority node; configuring a management scope for each role, the management scope of the role being a collection of management scopes of corresponding authority nodes.

[0068] In this embodiment, a permission node is associated with a corresponding management scope. The management scope can be understood as the permission scope of the permission node. The management scope includes data scope, functional scope and logical processing scope. The logical processing scope is the logical processing allowed for data within the configured data scope. Logical processing includes, for example, copying, deleting, modifying, calculating, etc. The management scope is also the scope of access control of the permission node. By configuring the management scope for each permission node, not only the access rights of the functional unit can be controlled, but also the access and processing rights of the data can be controlled.

[0069] The management scope may be implemented in the form of a table, including a permission management scope table and a role management scope table.

[0070] In one embodiment, the authority node includes, hierarchically from top to bottom, an authority abstraction unit, a return logic unit, and an entity unit;

[0071] The return value of the entity unit is sent to the return logic unit, and the return logic unit performs logical judgment on the return value.

[0072] In this embodiment, the permission ID and permission alias are stored in the permission abstract unit. The permission abstract unit is an implementation class that returns the attribute value of the business object. The return value of the permission abstract unit and the logical judgment of the return value are treated as a separate return logic unit, that is, as a separate class. The entity unit includes multiple classes, each class is a business permission category, such as employee permissions, attendance permissions and other business permission categories. Each class may include but is not limited to management scope information and basic information of the business permission category. Accordingly, a permission node corresponds to a management scope, and a management scope also correspondingly includes, from top to bottom, the permission abstract unit management scope, the return logic unit management scope and the entity unit management scope.

[0073] This embodiment divides the permission node into three units, especially separates the permission abstract unit and the return logic unit. Business content expansion only needs to configure the return logic unit without modifying the permission abstract unit.

[0074] In one embodiment, a method for generating a page further includes: when a temporary role needs to be configured, configuring an entity unit of a permission node corresponding to the temporary role, and adding a return value and a logic judgment of the entity unit in a return logic unit.

[0075] In this embodiment, temporary permissions can be added to users, that is, temporary roles can be added, which can be divided into two ways. One way is that the temporary permissions correspond to the entity unit of the existing permission node, then the entity unit does not need to be changed, and only the return value and logical judgment of the entity unit need to be added in the return logic unit to control the validity and authority of the temporary permissions. For example, if it is necessary to temporarily add employee permissions to user 1, a temporary role is added. The temporary role can only be accessed once, then it is necessary to add the return value of the access number limit in the return logic unit corresponding to the entity unit where the employee permissions are located. The added logical judgment can be to determine whether the access number is 1. If the access number is 1, the role is deleted.

[0076] Another way is that the entity units of the temporary permission and the existing permission nodes are different. You can first add the entity unit, and then add the return value and logical judgment of the entity unit in the return logic unit corresponding to the entity unit.

[0077] This embodiment supports configuration of temporary roles, which can be easily implemented by returning logical units without modifying the authority node as a whole, and the changes are relatively minor.

[0078] In one embodiment, a method for generating a page further includes: obtaining a department structure tree.

[0079] In step 105, a correspondence between users and roles is established, including: establishing a correspondence between roles and users of leaf node departments in the department structure tree, and not establishing a correspondence between roles and users of non-leaf node departments in the department structure tree.

[0080] In this embodiment, for example, the R&D group and the product group, as leaf nodes of the department structure tree, are affiliated to the common intermediate node Technology Department. In this case, a corresponding relationship between the users of the R&D group and the product group and the roles can be established, and the users of the Technology Department will inherit the permissions of the roles of the R&D group and the product group.

[0081] For example, when a user (supervisor) from the technical department logs in, the supervisor's permissions need to be determined. First, the structure tree of the department to which the supervisor belongs is queried, and then the leaf nodes managed by the supervisor are queried. The supervisor can have permissions for these leaf nodes without configuring roles and permissions for the supervisor.

[0082] This embodiment combines the department structure tree with the authority and role structure tree, and does not need to configure roles and authorities for all users in all departments, thus greatly reducing the workload.

[0083] The present disclosure provides a method for generating a page, which can be implemented by a terminal and includes the following steps:

[0084] In step 201, business modules are divided according to business requirements.

[0085] In step 202, the level of the page and the functional units in the page are determined with respect to the business process of each business module and the content of each business process.

[0086] In step 203, a permission tree is generated according to the functional units in the page and the level of the page; wherein, one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same layer in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page.

[0087] The permission node includes permission abstraction unit, return logic unit and entity unit in order from top to bottom. The return value of the entity unit is sent to the return logic unit, and the return logic unit performs logical judgment on the return value.

[0088] At the same time, in the process of generating the permission tree, you can also configure the management scope for each permission node; configure the management scope for each role, and the management scope of the role is the collection of the management scopes of the corresponding permission nodes.

[0089] In step 204, a correspondence between each authority node and a role is established according to business requirements.

[0090] In the process of establishing the correspondence between each permission node and a role, when two roles correspond to the same permission node, the permission node is located at the common parent permission node of the permission nodes corresponding to the two roles, or two different identifiers are assigned to the same permission node, corresponding to the two roles respectively. The child permission node inherits the permissions of the parent permission node.

[0091] When a temporary role needs to be configured, the entity unit of the permission node corresponding to the temporary role is configured, and the return value and logical judgment of the entity unit are added in the return logic unit.

[0092] In step 205, the department structure tree is obtained.

[0093] In step 206, a correspondence between users and roles is established.

[0094] The specific steps of step 206 are: establishing a corresponding relationship between roles and users of leaf node departments in the department structure tree, and not establishing a corresponding relationship between roles and users of non-leaf node departments in the department structure tree.

[0095] In step 207, a corresponding role page is generated for the user according to the permission node corresponding to the role.

[0096] According to a second aspect of an embodiment of the present disclosure, a device for generating a page is provided. Figure 2 is a block diagram of a device for generating a page according to an exemplary embodiment. Figure 2 As shown, the device comprises:

[0097] A division module 301 is used to divide the service modules according to service requirements;

[0098] The page module 302 is used to determine the level of the page and the functional units in the page according to the business process of each business module and the content of each business process;

[0099] The permission module 303 is used to generate a permission tree according to the functional units in the page and the level of the page; wherein one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same level in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page;

[0100] The role module 304 is used to establish the corresponding relationship between each permission node and the role according to business requirements;

[0101] User module 305, used to establish a corresponding relationship between users and roles;

[0102] The generation module 306 is used to generate a corresponding role page for the user according to the permission node corresponding to the role.

[0103] In one embodiment, a device for generating a page further includes: an allocation module, which is used to, when two roles correspond to the same permission node, locate the permission node at the common parent permission node of the permission nodes corresponding to the two roles; or, allocate two different identifiers to the same permission node, corresponding to the two roles respectively.

[0104] In one embodiment, a child authority node inherits the authority of a parent authority node.

[0105] In one embodiment, a device for generating a page further includes: a configuration module, which is used to configure a management scope for each authority node; and configure a management scope for each role, wherein the management scope of the role is a collection of management scopes of corresponding authority nodes.

[0106] In one embodiment, a device for generating a page, the permission node includes a permission abstraction unit, a return logic unit, and an entity unit in order from top to bottom in hierarchy;

[0107] The return value of the entity unit is sent to the return logic unit, and the return logic unit performs logical judgment on the return value.

[0108] In one embodiment, a device for generating a page further includes: an adding module for configuring an entity unit of an authority node corresponding to a temporary role when a temporary role needs to be configured, and adding a return value and logic judgment of the entity unit in a return logic unit.

[0109] In one embodiment, a device for generating a page further includes:

[0110] Acquisition module, used to obtain the department structure tree;

[0111] The matching module is used to establish a corresponding relationship between users and roles, including: establishing a corresponding relationship between roles and users of leaf node departments in the department structure tree; and not establishing a corresponding relationship between roles and users of non-leaf node departments in the department structure tree.

[0112] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0113] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0114] at least one processor; and

[0115] a memory communicatively connected to at least one processor; wherein,

[0116] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for generating a page.

[0117] Figure 3 1 is a block diagram of an electronic device 1800 according to an exemplary embodiment. As shown in the figure, for example, the device 1800 can be provided as a computer. Figure 3 , the device 1800 includes a processing component 1822, which further includes one or more processors, and a memory resource represented by a memory 1832 for storing instructions executable by the processing component 1822, such as an application. The application stored in the memory 1832 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1822 is configured to execute instructions to perform the above method to generate a page.

[0118] The device 1800 may also include a power supply component 1826 configured to perform power management of the device 1800, a wired or wireless network interface 1850 configured to connect the device 1800 to a network, and an input / output (I / O) interface 1858. The device 1800 may operate based on an operating system stored in the memory 1832, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0119] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to enable a computer to execute the above-mentioned method for generating a page.

[0120] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0121] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating a page, characterized in that: include: Divide business modules according to business needs; Determine the level of the page and the functional units in the page according to the business process of each business module and the content of each business process; Generate a permission tree according to the functional units in the page and the level of the page; wherein one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same level in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page; Establish the corresponding relationship between each permission node and role according to business needs; Establish the corresponding relationship between users and roles; Generate a corresponding role page for the user based on the permission node corresponding to the role; The permission node includes permission abstraction unit, return logic unit and entity unit from top to bottom in order; The return value of the entity unit is sent to the return logic unit, and the return logic unit performs logical judgment on the return value; wherein the permission abstract unit stores the permission ID and permission alias, the permission abstract unit is an implementation class, and returns the attribute value of the business object; the entity unit includes multiple classes, each class is a business permission category; When a temporary role needs to be configured, configure the entity unit of the permission node corresponding to the temporary role, and add the return value and logical judgment of the entity unit in the return logic unit; The method further includes: when two roles correspond to the same authority node, the authority node is located at a common parent authority node of the authority nodes corresponding to the two roles; or, assigning two different identifiers to the same authority node, corresponding to the two roles respectively; The child permission node inherits the permissions of the parent permission node; The method further includes: configuring a management scope for each authority node; configuring a management scope for each role, wherein the management scope of the role is a collection of management scopes of corresponding authority nodes.

2. The method for generating a page according to claim 1, characterized in that: The method further comprises: obtaining a department structure tree; The establishing of the corresponding relationship between the user and the role includes: establishing the corresponding relationship between the user of the leaf node department in the department structure tree and the role; No corresponding relationship is established between roles and users in non-leaf node departments in the department structure tree.

3. A device for generating a page, characterized in that: include: Division modules are used to divide business modules according to business needs; The page module is used to determine the level of the page and the functional units in the page according to the business process of each business module and the content of each business process; The permission module is used to generate a permission tree according to the functional units in the page and the level of the page; wherein one functional unit corresponds to one permission node in the permission tree, and the permission nodes corresponding to multiple functional units in the same page are located at the same level in the permission tree; the permission node corresponding to the functional unit in the parent page is closer to the root permission node in the permission tree than the permission node corresponding to the functional unit in the child page; The role module is used to establish the corresponding relationship between each permission node and the role according to business needs; User module, used to establish the correspondence between users and roles; The generation module is used to generate the corresponding role page for the user according to the permission node corresponding to the role; The permission node includes permission abstraction unit, return logic unit and entity unit from top to bottom in order; The return value of the entity unit is sent to the return logic unit, and the return logic unit performs logical judgment on the return value; wherein the permission abstract unit stores the permission ID and permission alias, the permission abstract unit is an implementation class, and returns the attribute value of the business object; the entity unit includes multiple classes, each class is a business permission category; When a temporary role needs to be configured, configure the entity unit of the permission node corresponding to the temporary role, and add the return value and logical judgment of the entity unit in the return logic unit; The method further includes: when two roles correspond to the same permission node, the permission node is located at a common parent permission node of the permission nodes corresponding to the two roles; or, two different identifiers are assigned to the same permission node, corresponding to the two roles respectively; The child permission node inherits the permissions of the parent permission node; Configure the management scope for each permission node; configure the management scope for each role. The management scope of the role is the collection of the management scopes of the corresponding permission nodes.

4. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 2.

5. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make the computer execute the method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Data processing method and device for application system cluster

    CN103870129A

  • Method and device for generating page based on permission

    CN110888695A