Page rendering method and device, electronic equipment and storage medium
By writing the target permission data to the display page in the middle and backend system, and automatically splicing the field names of the operation points, the problem of cumbersome naming of operation points in RBAC is solved, and development efficiency and page rendering efficiency are improved.
Patent Information
- Application Number
- CN202411130761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
AI Technical Summary
In the development of middle and backend systems, in role-based access control (RBAC), the front-end needs to bind unique keys to each page's operation point, resulting in duplication and cumbersome naming fields, which consumes a lot of time, affecting development efficiency.
By writing the target permission data into the display page, the field names of the operation points must be unique on this page and are automatically spliced according to the preset naming method. The field names of the operation points in each page can be automatically determined based on the operation type, etc. There is no need to repeatedly name the operation points of different pages.
Improve development efficiency, simplify the operation permission judgment process, reduce the steps of repeating the name field, and improve the efficiency of page rendering.
Smart Images

Figure CN119066291A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and specifically relates to a page rendering method, device, electronic device and storage medium. Background Art
[0002] In the development of mid- and back-end systems, permission control is a key component to ensure system security and data integrity. Permission control mechanisms usually involve: 1. Authentication: When a user logs into the system, he needs to provide identity credentials (such as username and password), and the system verifies the validity of these credentials. 2. Authorization: Authorization is the process of determining which resources a verified user can access or which operations he can perform. Users are usually divided into roles and permissions. Roles are groups of users with similar permissions. For example, "Administrator", "Editor" and "Guest"; permissions define operations on specific resources, such as read, write, delete, etc.
[0003] In the prior art, role-based access control (RBAC) is commonly used in the development of mid- and back-end systems. Users are assigned roles, which contain a series of permissions. When the front end verifies the operation permissions, each page has many operation points, and then there are many pages, so the entire system has a lot of operation points. In order to accurately determine the permissions of each operation point, the front end needs to bind the corresponding unique key to each operation point. The process of binding the unique key is very cumbersome and time-consuming. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a page rendering method, device, electronic device and storage medium, which eliminates the need to repeatedly name fields for operation points of different pages, thereby improving development efficiency.
[0005] In a first aspect, an embodiment of the present application provides a page rendering method, the method comprising: writing target permission data into a display page, the target permission data comprising a first identifier of each operation point within the user operation authority in the display interface, the user operation authority being the user's control authority over the operation point of the display page, the first identifier being determined based on the function and / or operation type of the operation point on the page; determining a rendering operation point from the operation points in the display page, the rendering operation point being an operation point whose first identifier is recorded in the target permission data; and rendering the rendering operation point on the display page.
[0006] The above page rendering method writes the target permission data into the display page, and the operation permissions of the page are taken out from the storage of the page to which it belongs. The field name of the operation point only needs to be unique on this page, so that each page can use the same naming method. According to the preset naming method, the field name of the operation point in each page can be automatically spliced according to the operation type, etc., without the need to repeatedly name the fields of the operation points on different pages, thereby improving development efficiency.
[0007] In an optional embodiment of the present application, the method also includes: receiving a page permission verification result, the page permission verification result includes a page within the user page permission, and the user page permission is the user's access rights to the page; determining a display page from a user request page, the user request page is a page requesting a permission judgment, and the display page is the user request page recorded in the page permission verification result.
[0008] In an optional embodiment of the present application, the page authority verification result is a second identifier of each page within the user's page authority, and the second identifier is a unique identifier of the page.
[0009] In an optional embodiment of the present application, the page authority verification result includes the authority data of each page within the user page authority.
[0010] In an optional embodiment of the present application, the permission data adopts a tree structure, the parent node in the tree structure is the second identifier of the page, the child node in the tree structure is the first identifier of the operation point within the user operation authority in the interface, and the second identifier is the unique identifier of the page.
[0011] In an optional embodiment of the present application, writing the target permission data into the display page includes: writing the target permission data into a global variable of the display page.
[0012] In an optional embodiment of the present application, a rendering operation point is determined from an operation point rendering request through a preset common component.
[0013] In a second aspect, an embodiment of the present application provides a page rendering device, comprising: a writing module, used to write target permission data into a display page, the target permission data including a first identifier of each operation point within the user operation permission in the display interface, the user operation permission being the user's control authority over the operation point of the display page, and the first identifier being determined based on the function and / or operation type of the operation point on the page; a judgment module, used to determine a rendering operation point from the operation points in the display page, the rendering operation point being an operation point whose first identifier is recorded in the target permission data; a rendering module, used to render the rendering operation point on the display page.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the processor being connected to the memory; the memory being used to store programs; and the processor being used to call the programs stored in the memory to execute any of the methods described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in any one of the first aspects is executed.
[0016] Other features and advantages of the present application will be described in the following description. The purpose and other advantages of the present application can be realized and obtained through the structures specifically pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The above and other purposes, features and advantages of the present application will be more clear as shown in the drawings.
[0018] Figure 1 A schematic block diagram showing an implementation scenario of the page rendering method provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of a process flow of a page rendering method provided in an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of a page rendering device provided by an embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present application are described in detail with reference to the accompanying drawings. It should be noted that although the same elements are shown in different drawings, they will be represented by the same reference numerals. In the following description, specific details such as detailed configuration and components are provided to only help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications to the embodiments described herein can be made without departing from the scope of the present application. In addition, for clarity and conciseness, the description of well-known functions and configurations is omitted. The terms described below are defined in consideration of the functions in the present application, and may be different according to the user, the user's intention or custom. Therefore, the definition of the term should be determined based on the content throughout this specification.
[0023] The present application may have various modifications and various embodiments, in which the embodiments are described in detail below with reference to the accompanying drawings. However, it should be understood that the present application is not limited to the embodiments, but includes all modifications, equivalents and substitutes within the scope of the present application.
[0024] The terms used herein are only used to describe various embodiments of the present application and are not intended to limit the present application. Unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In the present application, it should be understood that the term "including" or "having" indicates the presence of features, quantities, steps, operations, structural elements, parts or combinations thereof, and does not exclude the presence of one or more other features, quantities, steps, operations, structural elements, parts or combinations thereof, or the possibility of adding one or more other features, quantities, steps, operations, structural elements, parts or combinations thereof.
[0025] Unless defined differently, all terms used herein have the same meaning as understood by a person skilled in the art to which the present application belongs. Unless explicitly defined in the present application, terms (such as those defined in a general dictionary) should be interpreted as having the same meaning as the contextual meaning in the relevant art, and should not be interpreted as having an idealized or overly formal meaning.
[0026] The electronic device according to one embodiment may be one of various types of electronic devices. The electronic device may include, for example, a portable communication device (e.g., a smart phone), a computer, a portable multimedia device, a portable medical device, a camera, a wearable device, or a household appliance. According to one embodiment disclosed, the electronic device is not limited to those described above.
[0027] The terms used in this application are not intended to limit the application, but are intended to include various changes, equivalents or alternatives of corresponding embodiments. Regarding the description of the accompanying drawings, similar reference numerals may be used to represent similar elements or related elements. Unless the relevant context clearly indicates otherwise, the singular form of the noun corresponding to the item may include one or more things. As used herein, each of the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C" and "at least one of A, B or C" may include all possible combinations of the items listed together in the corresponding one in the phrase. As used herein, terms such as "the 1st", "the 2nd", "the first" and "the second" may be used to distinguish the corresponding component from another component, and are not intended to limit the component in other aspects (e.g., importance or order). It is intended that if an element (e.g., a first element) is referred to as being “coupled with,” “coupled to,” “connected to,” or “connected to” another element (e.g., a second element), with or without the term “operably” or “communicatively,” it indicates that the element may be coupled with the other element directly (e.g., wired), wirelessly, or via a third element.
[0028] As used herein, the term "module" may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with other terms (e.g., "logic," "logic block," "component," and "circuit"). A module may be a single integrated component or its smallest unit or component suitable for performing one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application specific integrated circuit (ASIC).
[0029] To facilitate understanding, the relevant terms and concepts involved in the embodiments of the present application are first introduced below.
[0030] The front end mainly considers the following three aspects when controlling permissions:
[0031] Menu permissions. Menu permissions refer to the number of left menu bars that the corresponding role can see, and the functions that the corresponding role can access. For menu permissions, a common front-end solution is that the back-end returns the unique key of all menus visible to the current role, the front-end matches, and then displays the visible menus and hides the remaining invisible menus.
[0032] Page permissions. Page permissions refer to the pages that the corresponding role can open, which are generally associated with the functions of the left menu bar. For page permissions, the common front-end solutions are similar to menu permissions. The back-end returns the unique key of the accessible page. When the user goes to the page, it is judged whether it is accessible. If it is not accessible, the user will be shown an inaccessible prompt.
[0033] Operation permissions. Operation permissions refer to the operations that the corresponding role can perform on the page, such as adding, editing, deleting, etc. For operation permissions, the common front-end solution is similar to the control solution of menu permissions. The back-end returns the unique key of all operation points (such as buttons) of the accessing user, and the front-end matches in the permission point list. If a match is found, the operation point is displayed, otherwise the operation point is hidden.
[0034] In order to accurately determine the permissions of each operation point during the operation permission determination process, it is necessary to bind a corresponding unique key to each operation point. This process of binding a unique key is cumbersome and time-consuming.
[0035] Based on the above problems, the present application proposes a page rendering method, in which the target permission data is written into the display page, and the operation permissions of the page are taken out from the storage of the page to which it belongs. The field name of the operation point only needs to be unique on this page, so that each page can use the same naming method. According to the preset naming method, the field name of the operation point in each page can be automatically spliced according to the operation type, etc., without the need to repeatedly name the fields of the operation points on different pages, thereby improving development efficiency.
[0036] like Figure 1 As shown, Figure 1 A schematic diagram showing an implementation scenario of the page rendering method of the present application is shown as follows: Figure 1 As shown, the implementation scenario may include a front-end device 110, a network 120, and a server 130. The network 120 is used to provide a medium for a communication link between the terminal device 110 and the server 130. The network 120 may include various connection types, such as wired and / or wireless communication links, and the like.
[0037] The user can use the front-end device 110 to interact with the server 130 through the network 120 to receive or send messages, etc. Various web browsing applications can be installed on the front-end device 110, such as shopping applications, search applications, instant messaging tools, email clients and / or social platform software.
[0038] The front-end device 110 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.
[0039] The server 130 may be a server that provides various web services, such as a background management server that provides support for websites browsed by users using the terminal device 110. The background management server may analyze and process the received user request and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device. The server 130 may be a single server, a server cluster, a cloud service, etc.
[0040] When a user accesses a web page from the front-end device 110 , the user will request the web page from the server 130 through the front-end device 110 , and the server 130 will return the web page data to the front-end device 110 .
[0041] The front-end device receives the web page data and writes the target authority data returned by the server 130 into the display page.
[0042] When rendering the operation point on the web page according to the web page data, the front-end device 110 determines the rendering operation point from the operation point rendering request and renders the rendering operation point on the display page.
[0043] like Figure 2 As shown, Figure 2 A schematic diagram of a page rendering method provided by an embodiment of the present application is shown. Figure 2 As shown, the method includes steps 210 to 230:
[0044] Step 210, write the target permission data into the display page, the target permission data includes the first identifier of each operation point within the user operation authority in the display interface, the user operation authority is the user's control authority over the operation point of the display page, and the first identifier is determined based on the function and / or operation type of the operation point on the page.
[0045] After determining that the user has the right to access the display page, the target permission data is written into the display page. The target permission data indicates which access operation points the user can control within the display page. The identifier of the operation point is used in this application to indicate the operation point that the user can control. When an identifier of an operation point is recorded in the permission data, it indicates that the operation point can be controlled by the user. Therefore, the target permission data includes the first identifier of each operation point within the user's operation permission in the display interface. Among them, the target permission data can be calculated based on the user's operation permission, and the user's operation permission is the user's control authority over the operation point of the display page.
[0046] For example, determine whether the display page is within the user's web page permissions. When the display page is within the user's web page permissions, determine that the user has the right to access the display page. The backend system will determine which operation points of the display page the user can control based on the user's operation permissions. Record the identifiers of the operation points that the user can control in the display page, thereby obtaining permission data. The backend system sends the permission data to the front-end device, and the front-end device writes the marked permission data into the display page.
[0047] The identifier of the operation point is also called a unique key, field, etc. It is a mark used for the operation point. The identifier of the operation point is unique within the page. Therefore, the first identifier in this application can be determined only based on the function and / or operation type of the operation point on the page. The function refers to which objects the operation point operates on. For example, if an operation point operates on data, the identifier of the operation point can be set to data. The operation type refers to adding, editing, deleting, etc. The identifier of the new operation point is set to add, the identifier of the editing operation point is edit, and the identifier of the deletion operation point is delete. The identifier can be generated by splicing. For example, if an operation point is to delete data, the identifier of the operation point can be data-delete.
[0048] In this application, the permission data is generated by the background system for a web page requested by the user to access, so the permission data corresponds one-to-one to the web page. More specifically, the permission data corresponds one-to-one to the web page and the user. For example, there are users A and B. The role of user A is administrator, and the role of user B is ordinary employee. Users A and B have the authority to view the employee management page and the project progress page. The administrator of the employee management page has the authority to add, edit, etc., while ordinary employees have only the authority to view. The administrator of the project progress page has the authority to edit and delete, while ordinary employees have the authority to add and edit. After the background system verifies that users A and B have the authority to view the in-service personnel management page, it generates the permission data of users A and B on the employee management page. For example, after verifying the administrator role of user A, the generated permission data is: add, edit. After verifying the ordinary employee role of user B, the permission data of user B on the employee management page is generated, such as view.
[0049] Similarly, after the backend system verifies that both users A and B have the permission to view the project progress page, it generates the permission data for users A and B on the project progress page. For example, after verifying the administrator role of user A, the permission data generated is: edit, delete. After verifying the ordinary employee role of user B, the permission data generated for user B on the employee management page is add, delete.
[0050] In this application, the background system will generate a permission data for each page, write the permission data of each page into the page, and make a judgment by rendering the operation point, and reading the data from the permission data stored in the page. In this application, since the operation point requests the permission data in this page for permission judgment, the identifier of an operation point only needs to be distinguished from the identifiers of other operation points in this page to determine whether the user has the permission of the operation point, that is, the identifier of an operation point only needs to be unique within the page, and does not need to be unique across all pages. Therefore, the naming method of the unique keys of all operation permissions can be unified, such as uniformly naming add as add, edit as edit, and delete as delete.
[0051] Therefore, the present application can predetermine the rules for the operation point identifier, so that the field names bound to the operation can be automatically spliced according to the operation type, without repeating the permission fields of the page, thereby improving development efficiency.
[0052] In one embodiment of the present application, writing the target permission data into the display page includes: writing the target permission data into a global variable of the display page.
[0053] After entering the display page, the permission data returned by the background system is written into the global variables of the display page to facilitate reading the permission information and making permission judgments on the operation points.
[0054] In one embodiment of the present application, the method also includes: receiving a page permission verification result, the page permission verification result includes a page within the user page permission, and the user page permission is the user's access rights to the page; determining a display page from a user request page, the user request page is a page requesting a permission judgment, and the display page is the user request page recorded in the page permission verification result.
[0055] When entering the system, the front-end device will request page permissions from the back-end system and receive the page permission verification results returned by the back-end system. The page permission verification results include the pages within the user's page permissions. The user's page permissions indicate which pages the user can access.
[0056] For example, the front-end device sends a verification request for page A to the back-end system, and the back-end system returns the page permission verification result through the permission interface. Alternatively, when a user enters the system, the back-end system determines which pages the user can access based on the user's page permissions, packages the pages the user can access into a page permission verification result, and sends it to the front-end device.
[0057] In one embodiment of the present application, the page authority verification result is a second identifier of each page within the user's page authority, and the second identifier is a unique identifier of the page.
[0058] For example, the permission field of page A is preset to auth_a, and the second identifier of each page within the user's page permissions can be directly used. The front end determines whether page A can be entered based on whether the permission interface returns the auth_a field.
[0059] In one embodiment of the present application, the page authority verification result includes the authority data of each page within the user's page authority.
[0060] After entering page A, the permission field auth_a returned by the background system and the user's operation point permissions on page A are written into the global variables of page A.
[0061] When judging the page permissions, the front end will compare the unique key of the page with the page permission data returned by the back end. If the match is successful, the page will be displayed. In this step, add a step of logic: store the unique key of the page in the global variable within the page, so as to write the permission data of the page.
[0062] Furthermore, the permission data adopts a tree structure, the parent node in the tree structure is the second identifier of the page, the child node in the tree structure is the first identifier of the operation point within the user operation authority in the interface, and the second identifier is the unique identifier of the page.
[0063] Operation permissions are associated with page permissions, that is, the operation permissions on a page are subordinate to the permissions of the page. If a role has the operation permissions of a page, it must have the operation permissions of the page. Therefore, the data structure of the permission unique key can be made into a tree structure, with the parent being the page permissions and the child being the operation permissions.
[0064] For example, there are operations B and C on page A, and the field of page A is auth_a. Then operations B and C are both child nodes of page A, namely auth_a, which can be: auth_a.op_b and auth_a.op_c.
[0065] Step 220: Determine a rendering operation point from the operation points in the display page, where the rendering operation point is an operation point whose first identifier is recorded in the target permission data.
[0066] When judging the operation permissions, first obtain the page permissions from the permission data in the page, such as global variables, and then obtain the corresponding operation permissions from the child level of the page permissions for comparison. For example, to obtain the operation button permissions, if the permission field of operation A is set to auth_a.op_a, the front end determines whether operation A has permission based on whether the auth_a.op_a field exists under the permission data written in the current page.
[0067] The operation point recorded in the target permission data is determined from the operation points in the display page. For example, if a matching identifier such as auth_a.op_a is matched, it means that operation A is recorded in the target permission data, and operation A is determined as the rendering operation point.
[0068] In one embodiment of the present application, a rendering operation point is determined from an operation point rendering request through a preset common component.
[0069] In the form of a public component, the caller only needs to pass in the unique key of the operation permission, such as add. The rest of the logic is handled by the public component, which ultimately decides whether to render the button of the operation point, which can reduce the difficulty of development.
[0070] Step 230: Render the rendering operation point on the display page.
[0071] When rendering the presentation page, only the determined rendering operation points are rendered.
[0072] The above page rendering method writes the target permission data into the display page, and the operation permissions of the page are taken out from the storage of the page to which it belongs. The field name of the operation point only needs to be unique on this page, so that each page can use the same naming method. According to the preset naming method, the field name of the operation point in each page can be automatically spliced according to the operation type, etc., without the need to repeatedly name the fields of the operation points on different pages, thereby improving development efficiency.
[0073] The page and the field names and data structures of the operation permissions on the page are designed according to the agreed rules. For example, if the permission of page A is auth_a, the field name of the operation permission A on page A is auth_a.op_a. When the front end enters the page, the page's permissions and sub-permissions will be written into the page's storage, and the page's operation permissions will be retrieved from the storage of the page to which it belongs. This speeds up the efficiency of determining the operation permissions.
[0074] like Figure 3 As shown, Figure 3 A page rendering device provided in an embodiment of the present application is shown, including: a writing module 310, a judgment module 320 and a rendering module 330.
[0075] The writing module 310 is used to write the target permission data into the display page. The target permission data includes the first identifier of each operation point within the user operation permission in the display interface. The user operation permission is the user's control authority over the operation point of the display page. The first identifier is determined based on the function and / or operation type of the operation point on the page.
[0076] The judgment module 320 is used to determine a rendering operation point from the operation points in the display page, and the rendering operation point is an operation point whose first identifier is recorded in the target permission data.
[0077] The rendering module 330 is used to render the rendering operation point on the display page.
[0078] The page rendering device provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0079] like Figure 4 As shown, Figure 4 A schematic block diagram of an electronic device 400 provided in an embodiment of the present application is shown. The electronic device 400 includes: a processor 410 and a memory 420 .
[0080] The processor 410, the memory 420 and each component are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The memory 420 is used to store computer programs, such as storing Figure 3 The software function module shown in the figure is the page rendering device 300. The page rendering device 300 includes at least one software function module that can be stored in the memory 420 in the form of software or firmware or solidified in the operating system (OS) of the electronic device 400. The processor 410 is used to execute the executable module stored in the memory 420, such as the software function module or computer program included in the page rendering device 300.
[0081] Among them, the memory 420 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0082] The processor 410 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a microprocessor, etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. Alternatively, the processor 410 may also be any conventional processor, etc.
[0083] The embodiment of the present application also provides a non-volatile computer-readable storage medium (hereinafter referred to as storage medium), on which a computer program is stored. When the computer program is run by a computer such as the above-mentioned electronic device 400, the page rendering method shown above is executed.
[0084] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0085] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0086] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0087] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a computer-readable storage medium, including several instructions for a computer device (which can be a personal computer, a laptop, a server, or an electronic device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0088] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A page rendering method, characterized in that: The method comprises: Writing target permission data into the display page, the target permission data including a first identifier of each operation point within the user operation permission in the display interface, the user operation permission being the user's control permission over the operation point of the display page, and the first identifier being determined according to the function and / or operation type of the operation point on the page; Determine a rendering operation point from the operation points in the display page, the rendering operation point being an operation point whose first identifier is recorded in the target permission data; The rendering operation point is rendered on the presentation page.
2. The method according to claim 1, characterized in that The method further comprises: Receive a page authority verification result, wherein the page authority verification result includes pages within the user page authority, and the user page authority is the user's access rights to the page; A display page is determined from a user request page, wherein the user request page is a page for requesting permission judgment, and the display page is a user request page recorded in the page permission verification result.
3. The method according to claim 2, characterized in that The page authority verification result is a second identifier of each page within the user's page authority, and the second identifier is a unique identifier of the page.
4. The method according to claim 2, characterized in that: The page authority verification result includes the authority data of each page within the user's page authority.
5. The method according to claim 4, characterized in that The authority data adopts a tree structure, in which the parent node is the second identifier of the page, the child node is the first identifier of the operation point within the user operation authority in the interface, and the second identifier is the unique identifier of the page.
6. The method according to claim 1, characterized in that The step of writing the target permission data into the display page includes: The target permission data is written into the global variable of the display page.
7. The method according to claim 1, characterized in that The rendering operation point is determined from the operation point rendering request through a preset common component.
8. A page rendering device, characterized in that: include: A writing module, used to write target permission data into the display page, wherein the target permission data includes a first identifier of each operation point within the user operation permission in the display interface, wherein the user operation permission is the user's control permission over the operation point of the display page, and the first identifier is determined according to the function and / or operation type of the operation point on the page; A determination module, configured to determine a rendering operation point from the operation points in the display page, wherein the rendering operation point is an operation point whose first identifier is recorded in the target permission data; A rendering module is used to render the rendering operation point on the display page.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is connected to the memory; The memory is used to store programs; The processor is used to call the program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Access authority control method and device
CN107341388A
Front-end authority control method
CN109740379A
Front-end operation authority control method and device and related equipment
CN111563215A
