Menu permission configuration method and device, equipment and computer readable storage medium
By acquiring menu data and permission rules and performing concatenation operations to generate target permission rules, the problem of difficulty in expanding menu permission rules is solved, and flexible menu permission configuration is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2021-12-24
- Publication Date
- 2026-07-24
AI Technical Summary
Menu permission rules are difficult to extend when configured in the system code, requiring code rewriting and thus making expansion difficult.
By obtaining menu data and its permission rules, the calculation method is determined to perform a connection operation, generating the target permission rule, and configuring it in the menu item, without rewriting the code.
The process of extending menu permission rules has been simplified, the difficulty of extension has been reduced, and flexible configuration of rules has been achieved.
Smart Images

Figure CN116339576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of menu technology, and in particular to a method, apparatus, device, and computer-readable storage medium for configuring menu permissions. Background Technology
[0002] Menus are widely used in applications to display a list or options of services offered by the application on the display screen, facilitating interaction between the terminal and the user. In some applications, the terminal determines whether to display the menu based on user decisions, which are implemented through menu permission rules.
[0003] Currently, the permission rules for the menu are written in the system code, and then the account and the permission rules for the menu are associated.
[0004] The configuration of this type of permission rule for the menu needs to be implemented through code. When it is necessary to extend the permission rule, the code needs to be rewritten, which is quite troublesome, making it difficult to extend the permission rule of the menu. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and computer-readable storage medium for configuring menu permissions, in order to solve the problem of the difficulty in expanding menu permission rules.
[0006] On one hand, the present invention provides a method for configuring menu permissions, including:
[0007] Obtain the menu data and the corresponding first permission rules for the menu data;
[0008] The calculation method for each of the first permission rules is determined based on the menu data;
[0009] The target permission rule is obtained by performing a connection operation on each of the first permission rules according to the aforementioned operation method.
[0010] Configure the target permission rule on the menu item corresponding to the menu data.
[0011] Optionally, the step of configuring the target permission rule to the menu item corresponding to the menu data includes:
[0012] Obtain the rule parameters corresponding to each of the first permission rules;
[0013] The type of the first permission rule corresponding to the rule parameter is determined based on the rule parameter;
[0014] Invoke the rule executor corresponding to the type to execute the first permission rule corresponding to the type, and obtain the execution result of each first permission rule;
[0015] The filtering mode of the menu item is determined based on each execution result;
[0016] Configure the target permission rules and the filtering mode in the menu item.
[0017] Optionally, the step of invoking the rule executor corresponding to the type to execute the first permission rule corresponding to the type includes:
[0018] Obtain the session information of the first user corresponding to the menu data;
[0019] The first permission rule, the session information, and the rule parameters corresponding to the first permission rule are input into the rule executor of the type corresponding to the first permission rule, so that the rule executor corresponding to the first permission rule executes the first permission rule.
[0020] Optionally, after configuring the target permission rule and the filtering mode in the menu item, the method further includes:
[0021] Obtain the user information of the second user and determine whether the user information meets the target permission rules to obtain a judgment result;
[0022] When the judgment result matches the filtering mode, the menu item is displayed.
[0023] Optionally, the step of determining the type of the first permission rule corresponding to the rule parameter based on the rule parameter includes:
[0024] The source of the first permission rule is determined based on the rule parameters;
[0025] The type of the first permission rule corresponding to the rule parameter is determined based on the source.
[0026] Optionally, when the filtering mode is a whitelist filtering mode and the judgment result is true, the judgment result matches the filtering mode;
[0027] Alternatively, if the filtering mode is a blacklist filtering mode and the judgment result is false, the judgment result matches the filtering mode.
[0028] On the other hand, the present invention also provides a menu permission configuration device, comprising:
[0029] The acquisition module is used to acquire menu data and the corresponding first permission rules for the menu data;
[0030] The determination module is used to determine the calculation method for each of the first permission rules based on the menu data;
[0031] The calculation module is used to perform a connection operation on each of the first permission rules according to the calculation method to obtain the target permission rule;
[0032] The configuration module is used to configure the target permission rules to the menu items corresponding to the menu data.
[0033] On the other hand, the present invention also provides a menu permission configuration device, including: a memory and a processor;
[0034] The memory stores computer-executed instructions;
[0035] The processor executes the computer execution instructions stored in the memory, causing the processor to perform the menu permission configuration method as described above.
[0036] On the other hand, the present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the menu permission configuration method as described above.
[0037] The present invention provides a method, apparatus, device, and computer-readable storage medium for configuring menu permissions. The method involves acquiring menu data and corresponding first permission rules, determining the calculation method for each first permission rule based on the menu data, performing a concatenation operation on the first permission rules according to the calculation method to obtain a target permission rule, and finally configuring the target permission rule on the menu item corresponding to the menu data. In this invention, rule expansion can be achieved through the concatenation operation of multiple rules without rewriting code, simplifying the menu permission rule expansion process and reducing the difficulty of expanding menu permission rules. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0039] Figure 1 This is a schematic diagram illustrating a scenario in which the menu permission configuration method of the present invention is implemented;
[0040] Figure 2 This is a flowchart illustrating the first embodiment of the menu permission configuration method of the present invention;
[0041] Figure 3 This is a detailed flowchart of step S40 in the second embodiment of the menu permission configuration method of the present invention.
[0042] Figure 4 This is a detailed flowchart of step S43 in the third embodiment of the menu permission configuration method of the present invention.
[0043] Figure 5 This is a schematic diagram of the module of the menu permission configuration device of the present invention;
[0044] Figure 6 This is a schematic diagram of the hardware structure of the device for configuring menu permissions according to the present invention.
[0045] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0046] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0047] This invention provides a method for configuring menu permissions. (See reference...) Figure 1 The menu permission configuration device includes a presentation layer-related system and a menu management system. The presentation layer-related system is responsible for displaying the menu and stores user session parameters. The menu management system retrieves these session parameters from the presentation layer. These parameters are used by the menu management system to obtain user information, which can then be used to determine menu permissions, such as the user's province or whether the user is an authenticated user. The menu management system comprises five parts: a data storage module, a built-in rule system, a caching system, a rule script executor, and a combination calculator.
[0048] The data storage module stores data related to the menu and display rules. Figure 1 The document lists the main data tables: the menu data table, the rule configuration table, the rule parameter table, and the combined operation configuration table. The menu data table primarily stores and displays related configurations, such as menu names, icons, and tree-like cascading structures. The rule data table stores rule judgment scripts, which receive two sets of parameters: session parameters for the logged-in account or anonymous login, and the judgment parameters configured in the rule parameter table. The combined operation configuration table contains the join operators for multiple rules and the judgment filtering modes.
[0049] The system has built-in rules. These commonly used rules are used in the same way as the script rules, and their parameter configurations are the same.
[0050] Since the data in the menu association system is all runtime read-only configuration data, a cache system that refreshes periodically is used for storage, and data is read from the cache system uniformly when needed.
[0051] Rule script executor: Used to parse rule scripts, inject session parameters and rule judgment parameters, execute rule scripts and return calculation results.
[0052] The combiner is used to perform concatenation operations on multiple rules and ultimately filter the menu items. It should be noted that external rules can be executed by calling an external rule engine.
[0053] The menu management system will send the results of the combination operation of the combinatorial operator to the relevant systems in the presentation layer.
[0054] The technical solutions of the present invention and how they solve the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0055] Reference Figure 2 , Figure 2 This is a first embodiment of the menu permission configuration method of the present invention. The menu permission configuration method includes the following steps:
[0056] Step S10: Obtain the menu data and the corresponding first permission rules.
[0057] In this embodiment, the execution entity is the menu permission configuration device. For ease of description, the term "device" will be used below to refer to the menu permission configuration device. When it is necessary to configure menu permissions, the device requests menu data. The menu data consists of the menu items for which menu permissions need to be configured.
[0058] The device stores a menu data table and a rule configuration table. The menu data table and the rule configuration table can have a one-to-many relationship. After determining the menu data, the device determines the corresponding menu data table. Since the menu data table corresponds to the rule configuration table, the rule configuration table can be determined from the determined menu data table. Furthermore, permission rules can be obtained from the rule configuration table, and these obtained permission rules are defined as the first permission rules. In other words, the device obtains multiple first permission rules.
[0059] The rule configuration table records rule invocation information, invocation mode, menu foreign keys, and rule primary keys. See Table-1 for details:
[0060] Table 1
[0061]
[0062]
[0063] Step S20: Determine the calculation method for each first permission rule based on the menu data.
[0064] Step S30: Perform a connection operation on each first permission rule according to the operation method to obtain the target permission rule.
[0065] The menu data table corresponding to the menu data specifies the operation method for each first permission rule, including at least one of the AND and OR operations. The AND operation is represented by AND, and the OR operation is represented by OR.
[0066] The device retrieves the calculation method for each first permission rule from the menu data table corresponding to the menu data. The device then performs a concatenation operation on each first permission rule based on the determined calculation method to obtain the target permission rule.
[0067] Step S40: Configure the target permission rule for the menu item corresponding to the menu data.
[0068] After obtaining the target permission rules, the rules are configured on the menu items corresponding to the menu data, thus completing the menu permission configuration. When the device detects a user login, it obtains the user's information; if the information matches the target permission rules, the menu item is displayed.
[0069] For example, the target permission rule for the menu item "Menu 1" can be configured as follows: it should be visible to all logged-in users in "Beijing" and "Shanghai" (excluding anonymous users), but not to users with the user ID "003". If the device determines that the user ID is 003 based on the user's information, then Menu 1 will not be displayed; if the device determines that the user is from Shanghai or Beijing based on the user's information, then the menu item will be displayed.
[0070] In the technical solution provided in this embodiment, menu data and the corresponding first permission rules are obtained. The calculation method for each first permission rule is determined based on the menu data. The first permission rules are then concatenated according to the calculation method to obtain the target permission rule. Finally, the target permission rule is configured in the menu item corresponding to the menu data. In this invention, rule expansion can be achieved through the concatenation of multiple rules without rewriting code, simplifying the process of expanding menu rule permissions and reducing the difficulty of expanding menu permission rules.
[0071] Reference Figure 3 , Figure 3 This is a second embodiment of the menu permission configuration method of the present invention. Based on the first embodiment, step S40 includes:
[0072] Step S41: Obtain the rule parameters corresponding to each first permission rule.
[0073] In this embodiment, the rule configuration table corresponds to a rule parameter table. After determining the first permission rule, the corresponding rule parameter table can be determined based on the rule configuration table where the first permission rule is located, and then the rule parameters in the rule parameter table can be determined as the rule parameters corresponding to the first permission rule. The device can use fixed parameters from the rule configuration table as part of the rules, such as allowing only specific provinces to be displayed in a menu. See Table-2 for the rule parameter table:
[0074] Table 2
[0075] rule_id Foreign Key Rules param_key Parameter name param_value Parameter value
[0076] Step S42: Determine the type of the first permission rule corresponding to the rule parameter based on the rule parameter.
[0077] Permission rules can be categorized into built-in rules, script rules, and external rules. The type of a permission rule can be specified in the rule parameters via a function. The device can then determine the type of the first permission rule corresponding to the specified rule parameter directly from the rule parameters.
[0078] Furthermore, the device can directly determine the source of the first permission rule based on the rule parameters. Specifically, built-in rules are rules written in code within the device, and the source of permission rules can be the device's built-in rules. Script rules are executed by the device's internal script engine, so the source of script rules is the script engine. Permission rules can also be transmitted externally, for example, by obtaining external rules through interfaces. Loading rules based on their source determines the type of the first permission rule corresponding to the rule parameters.
[0079] In addition, the source can be determined based on user information and rule parameters.
[0080] Step S43: Call the rule executor corresponding to the type to execute the first permission rule corresponding to the type, and obtain the execution result of each first permission rule.
[0081] After determining the type of each first permission rule, the device calls the rule executor corresponding to the type to execute the first permission rule and obtain the execution result of each first permission rule. For example, if the first permission rule is a built-in rule, the built-in rule executor is called to execute the built-in rule; if the first permission rule is a script rule, the rule script executor is called to execute the script rule; if the first permission rule is an external rule, the external rule engine is called to execute the external rule.
[0082] Step S44: Determine the filtering mode of the menu items based on the execution results.
[0083] After obtaining the execution results, the display mode of the menu items can be determined based on each result. The execution result is either true or false. Each execution result is combined to obtain the final execution result, and the combination operation method is the same as that of the first permission rule. Filtering modes include blacklist filtering mode and whitelist filtering mode. Blacklist filtering mode means that items with a final execution result of true are not displayed, and all others are displayed; whitelist filtering mode means that only items with a final execution result of true are displayed, and all others are not displayed. Each menu item is ultimately displayed based on its corresponding configured filtering mode.
[0084] The type of filtering mode can be specified in the menu data table, see Table-3 for details:
[0085] Table 3
[0086]
[0087] Step S45: Configure the target permission rules and filtering modes in the menu item.
[0088] After determining the filtering mode, configure the target permission rules and filtering mode in the menu item.
[0089] During application, i.e., after step S45, the device obtains the user information of the second user and determines whether the user information meets the target permission rules to obtain a judgment result. It should be noted that when the configured menu item is applied, the user performing the operation on the interface where the menu item is located is the second user.
[0090] If the judgment result matches the filtering mode, the menu item is displayed. Specifically, if the filtering mode is whitelist filtering and the judgment result is true, the judgment result matches the filtering mode; or, if the filtering mode is blacklist filtering and the judgment result is false, the judgment result matches the filtering mode. For example, if the menu item is in whitelist filtering mode, and the judgment result is true, then the judgment result matches the filtering mode, and the menu item is displayed. If the judgment result is false, then the judgment result does not match the filtering mode, and the menu item is not displayed.
[0091] The following are examples.
[0092] Configure the menu item "Menu 1" to be visible to all logged-in users (excluding anonymous users) in "Beijing" and "Shanghai", but not to users with the user ID "003". To implement this rule, configure the judgment script checkProvince(srcProvince, targetProvince), and configure the relevant parameters of Beijing and Shanghai as targetProvince. srcProvince is retrieved from the session. The execution result returns true for users in provinces that meet the conditions, and false otherwise.
[0093] Configure the judgment script checkNotUserId(srcUserId, targetUserId), and set "003" as targetUserId. The srcUserId is retrieved from the session. The execution result returns true if the user is not "003", otherwise it returns false.
[0094] Secondly, the rule concatenation operator needs to be configured as AND, and the rule filtering mode needs to be configured as whitelist.
[0095] Finally, apply this rule to a menu item. This makes the menu item visible to all logged-in users (excluding anonymous users) of "Beijing" and "Shanghai", but not visible to the user with the user ID "003".
[0096] In the technical solution provided in this embodiment, the device obtains the rule parameters corresponding to each first permission rule, determines the type of the first permission rule corresponding to the rule parameters based on the rule parameters, calls the rule executor corresponding to the type to execute the first permission rule corresponding to the type to obtain the execution result of each first permission rule, then determines the filtering mode of the menu item based on each execution result, and finally configures the target permission rule and the filtering mode on the menu item so that the menu item is visible to some users based on the target permission rule and the filtering mode.
[0097] Reference Figure 4 , Figure 4 This is a third embodiment of the menu permission configuration method of the present invention. Based on the second embodiment, step S43 includes:
[0098] Step S431: Obtain the session information of the first user corresponding to the menu data.
[0099] In this embodiment, rule execution requires judgment based on user information. This includes information such as the user's province and whether the user is an authenticated user; this information needs to be read from the session parameters. The device determines the session information of the first user corresponding to the menu data; this session information is used for the judgment.
[0100] Step S432: Input the first permission rule, session information, and rule parameters corresponding to the first permission rule into the rule executor of the type corresponding to the first permission rule, so that the rule executor corresponding to the first permission rule executes the first permission rule.
[0101] Furthermore, when the rule executor executes permission rules, it needs to call at least some of the rule parameters of the permission rules. For example, if a menu item is only allowed to be seen by the user with ID 003, the rule function could be `checkUser(currentUserId, targetUserId)`. The parameter obtained from the session information is the current user ID `currentUserId`, and the rule parameter to be judged is `targetUserId` (passed as 003). The judgment logic is: if `currentUserId = targetUserId`, then return true. It should be noted that the user allowed to view the menu item corresponding to the menu data is the first user. For example, if a menu item is only allowed to be seen by the user with ID 003, then the user with ID 003 is the first user.
[0102] After obtaining the session parameters, the device inputs the session parameters, the first permission rule, and the rule parameters into the rule executor corresponding to the first permission rule, so that the rule executor executes the first permission rule.
[0103] In the technical solution provided in this embodiment, the device obtains the session information of the first user corresponding to the menu data, and then inputs the first permission rule, the session information and the rule parameters corresponding to the first permission rule into the rule executor corresponding to the first permission rule, so that the rule executor outputs accurate execution results.
[0104] The present invention also provides a device for configuring menu permissions, as described above. Figure 5 The menu permission configuration device 500 includes:
[0105] The acquisition module 510 is used to acquire menu data and the corresponding first permission rules for the menu data;
[0106] The determination module 520 is used to determine the calculation method for each first permission rule based on the menu data;
[0107] The calculation module 530 is used to perform connection calculations on each first permission rule according to the calculation method to obtain the target permission rule;
[0108] Configuration module 540 is used to configure the target permission rules for the menu items corresponding to the menu data.
[0109] In one embodiment, the menu permission configuration device 500 includes:
[0110] The acquisition module 510 is used to acquire the rule parameters corresponding to each first permission rule;
[0111] The determination module 520 is used to determine the type of the first permission rule corresponding to the rule parameter based on the rule parameter.
[0112] The calling module is used to call the rule executor corresponding to the type to execute the first permission rule corresponding to the type and obtain the execution result of each first permission rule;
[0113] The determination module 520 is used to determine the filtering mode of the menu items based on the results of each execution.
[0114] Configuration module 540 is used to configure target permission rules and filtering modes in menu items.
[0115] In one embodiment, the menu permission configuration device 500 includes:
[0116] The acquisition module 510 is used to acquire the session information of the first user corresponding to the menu data;
[0117] The input module is used to input the first permission rule, session information, and the rule parameters corresponding to the first permission rule into the rule executor of the type corresponding to the first permission rule, so that the rule executor corresponding to the first permission rule executes the first permission rule.
[0118] In one embodiment, the menu permission configuration device 500 includes:
[0119] The acquisition module 510 is used to acquire the user information of the second user and determine whether the user information meets the target permission rules to obtain the judgment result;
[0120] The display module is used to show menu items when the judgment result matches the filtering mode.
[0121] In one embodiment, the menu permission configuration device 500 includes:
[0122] The determination module 520 is used to determine the source of the first permission rule based on the rule parameters;
[0123] The determination module 520 is used to determine the type of the first permission rule corresponding to the rule parameter based on the source.
[0124] Figure 6 This is a hardware structure diagram of a menu permission configuration device according to an exemplary embodiment.
[0125] The menu permission configuration device 600 may include: processing 601, such as a CPU, memory 602, and transceiver 603. Those skilled in the art will understand that... Figure 6The structure shown does not constitute a limitation on the configuration device for menu permissions and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Memory 602 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0126] The processor 601 can call the computer program stored in the memory 602 to complete all or part of the steps of the above-described menu permission configuration method.
[0127] Transceiver 603 is used to receive information sent by external devices and to send information to external devices.
[0128] A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a menu permission configuration device, the menu permission configuration device is able to perform the menu permission configuration method described above.
[0129] A computer program product includes a computer program that, when executed by a processor of a menu permission configuration device, enables the menu permission configuration device to perform the menu permission configuration method described above.
[0130] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0131] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for configuring menu permissions, characterized in that, include: Retrieve menu data, which consists of menu items for which menu permissions need to be configured; Determine the menu data table corresponding to the menu data, and determine the pre-stored rule configuration table corresponding to the menu data table, so as to obtain each first permission rule from the rule configuration table. The first permission rule is rule call information, call mode, menu foreign key or rule primary key; The calculation method for each of the first permission rules is determined from the menu data table corresponding to the menu data; then, the first permission rules are joined according to the calculation method to obtain the target permission rule; The corresponding rule parameter table is determined based on the rule configuration table where the first permission rule is located, so that the rule parameters in the rule parameter table are determined as the rule parameters corresponding to the first permission rule. The type of the permission rule is written in the rule parameter through a function, so that the type of the first permission rule corresponding to the rule parameter is determined according to the rule parameter. The type includes built-in rules, script rules and external rules. The rule executor corresponding to the type is invoked to execute the first permission rule corresponding to the type, and the execution result of each first permission rule is obtained; the filtering mode of the menu item is determined according to each execution result. The filtering mode includes blacklist filtering mode and whitelist filtering mode. Blacklist filtering mode means that items with a final execution result of true are not displayed, and the rest are displayed; whitelist filtering mode means that items with a final execution result of true are displayed, and the rest are not displayed. Each menu item is ultimately determined to be displayed according to the corresponding configured filtering mode. Configure the target permission rule and the filtering mode in the menu item; Obtain the user information of the second user, determine whether the user information meets the target permission rules, and if the judgment result matches the filtering mode, then display the menu item.
2. The method for configuring menu permissions according to claim 1, characterized in that, The step of invoking the rule executor corresponding to the type to execute the first permission rule corresponding to the type includes: Obtain the session information of the first user corresponding to the menu data; The first permission rule, the session information, and the rule parameters corresponding to the first permission rule are input into the rule executor of the type corresponding to the first permission rule, so that the rule executor corresponding to the first permission rule executes the first permission rule.
3. The method for configuring menu permissions according to claim 1, characterized in that, When the filtering mode is a whitelist filtering mode and the judgment result is true, the judgment result matches the filtering mode. Alternatively, if the filtering mode is a blacklist filtering mode and the judgment result is false, the judgment result matches the filtering mode.
4. The method for configuring menu permissions according to claim 1, characterized in that, The step of determining the type of the first permission rule corresponding to the rule parameter based on the rule parameter includes: The source of the first permission rule is determined based on the rule parameters; The type of the first permission rule corresponding to the rule parameter is determined based on the source.
5. The method for configuring menu permissions according to any one of claims 1-3, characterized in that, The operation method includes at least one of the AND operation and the OR operation.
6. A menu permission configuration device, characterized in that, include: The acquisition module is used to acquire menu data, which consists of menu items for which menu permissions need to be configured. Determine the menu data table corresponding to the menu data, and determine the pre-stored rule configuration table corresponding to the menu data table, so as to obtain each first permission rule from the rule configuration table. The first permission rule is rule call information, call mode, menu foreign key or rule primary key; The determination module is used to determine the calculation method of each of the first permission rules from the menu data table corresponding to the menu data; The calculation module is used to perform a connection operation on each of the first permission rules according to the calculation method to obtain the target permission rule; Configuration module, used for Based on the rule configuration table containing the first permission rule, a corresponding rule parameter table is determined, and the rule parameters in the rule parameter table are determined as the rule parameters corresponding to the first permission rule. The type of the permission rule is written in the rule parameters through a function. The type of the first permission rule corresponding to the rule parameter is determined according to the rule parameters. The type includes built-in rules, script rules, and external rules. The rule executor corresponding to the type is called to execute the first permission rule corresponding to the type, obtaining the execution result of each first permission rule. The filtering mode of the menu item is determined based on each execution result. The filtering modes include blacklist filtering mode and whitelist filtering mode. Blacklist filtering mode means that items with a final execution result of true are not displayed, and the rest are displayed. Whitelist filtering mode means that items with a final execution result of true are displayed, and the rest are not displayed. Each menu item is ultimately determined to be displayed according to the corresponding configured filtering mode. The target permission rule and the filtering mode are configured in the menu item. The user information of the second user is obtained, and it is determined whether the user information meets the target permission rule. If the judgment result matches the filtering mode, the menu item is displayed.
7. A device for configuring menu permissions, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the menu permission configuration method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the menu permission configuration method as described in any one of claims 1 to 5.