CN111563215B - Method and device for controlling front-end operation authority and related equipment - Google Patents

Method and device for controlling front-end operation authority and related equipment Download PDF

Info

Publication number
CN111563215B
CN111563215B CN202010684880.4A CN202010684880A CN111563215B CN 111563215 B CN111563215 B CN 111563215B CN 202010684880 A CN202010684880 A CN 202010684880A CN 111563215 B CN111563215 B CN 111563215B
Authority
CN
China
Prior art keywords
user
operation authority
information
authority information
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010684880.4A
Other languages
Chinese (zh)
Other versions
CN111563215A (en
Inventor
黄佳鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ping An Smart Healthcare Technology Co ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010684880.4A priority Critical patent/CN111563215B/en
Publication of CN111563215A publication Critical patent/CN111563215A/en
Application granted granted Critical
Publication of CN111563215B publication Critical patent/CN111563215B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a method and a device for controlling front-end operation authority and related equipment. The method comprises the following steps: obtaining user information of a logged-in user and lightweight operation authority information of the user; storing the lightweight operation authority information in the routing data of the current route of the dynamic routing table; determining the running state of the system; if the running state of the system is idle, acquiring the full operation authority information of the user; and respectively storing the total operation authority information into the routing data of the route corresponding to each relevant page in the dynamic routing table. According to the technical scheme, when the first screen is loaded, the operation authority information of the user is directly stored in the routing data corresponding to the dynamic routing table, when the system is idle, the full operation authority information of the relevant page except the current request page is obtained, the first screen loading performance can be greatly improved, and the user experience is further improved.

Description

Method and device for controlling front-end operation authority and related equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method for controlling front-end operation permissions, a device for controlling front-end operation permissions, an electronic device, and a computer-readable storage medium.
Background
With the rapid development of social economy, the internet becomes the mainstream entertainment mode in people's life, and people realize life entertainment through surfing the internet.
With the increasing complexity of internet products, the reasonable control of operation authority is almost essential for every system. The existing general method is to store the operation authority information returned by the background in the front-end local (for example, in memory variables, Vuex, reduce, localStorage, etc.), and when rendering a button, perform logic processing with respect to the data to judge display or hiding.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the application provides a control method of a front-end operation authority, a control device of the front-end operation authority, an electronic device and a computer readable storage medium, which are used for returning light-weight operation authority information when a user requests a home screen page, so that the home screen loading performance is improved, and the user experience is improved.
The method for controlling the front-end operation authority provided by the application comprises the following steps:
obtaining user information of a logged-in user and obtaining lightweight operation authority information of the user, wherein the lightweight operation authority information is the operation authority information of the user on a current request page; storing the lightweight operation authority information in the routing data of the current route of the dynamic routing table, wherein the current route is the route corresponding to the current request page; determining the running state of the system; if the running state of the system is idle, acquiring the full operation authority information of the user, wherein the full operation authority information comprises the operation authority information of a relevant page of the current request page; and storing the total operation authority information in the routing data of the route corresponding to each relevant page in the dynamic routing table.
In some embodiments of the present invention, based on the foregoing scheme, the method for controlling front-end operation authority further includes: if request information of a user for requesting a target page is received, verifying the authority of the user on the target page according to the operation authority information in the dynamic routing table to obtain a verification result, wherein the operation authority information comprises lightweight operation authority information and full operation authority information; and displaying the page according to the verification result.
In some embodiments of the present invention, based on the foregoing scheme, the displaying a page according to the verification result includes: if the user has the operation authority of the target page, displaying the target page according to the operation authority information of the user; and if the user does not have the operation authority of the target page, returning prompt information, wherein the prompt information is used for indicating that the user does not have the operation authority of the target page.
In some embodiments of the present invention, based on the foregoing scheme, if the user has the operation right of the target page, displaying the target page according to the operation right information of the user includes: generating an authority routing table according to each route of which the user has operation authority in the dynamic routing table; converting the authority routing table into a routing component and dynamically adding the routing component through a routing manager; and rendering the routing component through the rendering component so as to display a page according to the operation authority information of the user.
In some embodiments of the present invention, based on the foregoing solution, determining the operation state of the system includes: and if the utilization rate of the CPU of the system is lower than a preset threshold value, determining that the running state of the system is idle, and if the utilization rate of the CPU of the system is greater than or equal to the preset threshold value, determining that the running state of the system is busy.
In some embodiments of the present invention, based on the foregoing scheme, acquiring user information of a logged-in user and acquiring lightweight operation authority information of the user includes: acquiring user information of a logged-in user, and acquiring role information of the user according to the user information of the logged-in user; and acquiring the lightweight operation authority information of the user according to the role information.
In some embodiments of the present invention, based on the foregoing scheme, the front-end operation authority control method further includes: and if the user is detected to exit the system, clearing the operation authority information of the user.
The application also provides a control device of front-end operation authority, including: the first obtaining unit is used for obtaining user information of a logged-in user and obtaining lightweight operation authority information of the user, wherein the lightweight operation authority information is the operation authority information of the user on a current request page; the first storage unit is used for storing the lightweight operation authority information into the routing data of the current route of a dynamic routing table, the dynamic routing table is a routing table which is automatically adjusted by a router according to the network running condition, and the current route is a route corresponding to the current request page; the determining unit is used for determining the running state of the system; the second obtaining unit is used for obtaining the full operation authority information of the user if the running state of the system is idle, wherein the full operation authority information comprises the operation authority information of the related page of the current request page; and the second storage unit is used for respectively storing the full-amount operation authority information into the routing data of each route corresponding to each relevant page in the dynamic routing table.
The application also provides an electronic device, one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors realize the control method of the front-end operation authority.
The present application further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for controlling front-end operation authority as described above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the technical scheme, when a user requests a current request page, only lightweight operation authority information is returned, after the system is confirmed to be idle, the full operation authority information of the page related to the current request page is requested to be obtained, and then the lightweight operation authority information and the full operation authority information are stored in the routing data corresponding to each page in the dynamic routing table.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic illustration of an implementation environment to which the present application is directed.
Fig. 2 is a flowchart illustrating a method for controlling front-end operation authority according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a method for controlling front-end operation authority according to an exemplary embodiment.
Fig. 4 is a flowchart of step S321 in another embodiment in the embodiment shown in fig. 3.
Fig. 5 is a block diagram illustrating a front-end operation authority control apparatus according to an exemplary embodiment.
Fig. 6 is a schematic diagram illustrating a hardware structure of a front-end operation authority control device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like 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 application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Referring to FIG. 1, FIG. 1 is a schematic diagram of an implementation environment in accordance with the present application.
As shown in fig. 1, the method for controlling front-end operation authority is applied to the terminal 10 and is implemented by interaction between the terminal 10 and the server 20.
Specifically, the server 20 may provide the operation authority information, and when a different user logs in the terminal 10, the server inputs the user information of the different login user, and determines the operation authority information owned by the different user information according to the user information and transmits the operation authority information back to the terminal 10.
It should be noted that the terminal 10 and the server 20 interact through a network, which may be any one of a 4G network, a 5G network, and a Wi-Fi network. The terminal 10 may be any one of terminals such as a mobile phone, a tablet computer, a portable electronic device, etc., it should be understood that the number of the servers 20 and the terminals 10 shown in fig. 1 is only illustrative, and there may be any number of the terminals 10 and the servers 20 according to actual needs, for example, a server cluster composed of a plurality of servers.
Fig. 2 is a flowchart illustrating a method for controlling front-end operation authority, which may be specifically executed by the terminal 10 in the implementation environment illustrated in fig. 1, according to an exemplary embodiment, as illustrated in fig. 2, and in an exemplary embodiment, the method for controlling front-end operation authority may include the following steps S210 to S250.
Step S210, obtaining user information of the logged-in user and obtaining lightweight operation permission information of the user, where the lightweight operation permission information is operation permission information of the user on the current request page.
The lightweight operation permission information refers to operation permission information of the user on a current request page, where the current request page includes the page and each function module on the page, that is, the lightweight operation permission information is used to indicate whether the user has the current request page and the operation permission of each function module on the page. The operation authority information includes basic operation authority information such as addition, deletion, check, change and the like.
The user opens the webpage at the front end, usually the webpage prompts the user to log in, the user needs to input an account and a password, and the user logs in successfully when the account and the password input by the user are both correct. The user information of the user refers to an identifier, such as token, for uniquely identifying the user identity. The operation authority information of the user is preset by a developer, can be set arbitrarily according to actual business conditions, and is schematically represented by a VIP user and a common user, the VIP user has VIP exclusive account management in a menu bar after logging in a page, and the common user does not have the route when logging in the menu bar after logging in the page.
In another embodiment, the route may be intercepted by a hook function, and whether the user information of the user is stored in the browser cache is determined, and if the user information of the user is not stored in the browser cache, the server is requested to obtain the user information of the user and store the user information in the browser cache. And then, acquiring lightweight operation authority information of the user information on the current request page according to the user information request.
It should be noted that the current request page may be composed of a plurality of functional modules, where each functional module may have a corresponding route, and the obtaining of the lightweight operation permission information of the user on the current request page is obtaining permission information of basic operation permissions of the user on the current request page and each functional module on the current request page, such as addition, deletion, search, and modification.
Step S220, the lightweight operation permission information is stored in the routing data of the current route in the dynamic routing table, where the current route is a route corresponding to the current request page.
The route is a mapping from a URL (Uniform Resource Locator) to a page or a function of a functional module on the page, and then is determined by the corresponding function and returned to the front end.
The current route is the route corresponding to the current request page.
The dynamic Routing list is established by the router and is automatically adjusted according to the network operation condition, and the router automatically learns and memorizes the network operation condition according to the function provided by a Routing Protocol (Routing Protocol) and automatically calculates the optimal path of data transmission when needed.
As described above, the lightweight operation permission information of the current request page is permission information of basic operation permissions of the current request page and each function module of the current request page, such as addition, deletion, check, and modification.
And storing the authority information of the basic operation authority such as addition, deletion, check, change and the like of the current request page and each functional module of the current request page under the routing data of the route corresponding to each functional module of the current request page.
Therefore, when the user requests the current request page, only the lightweight operation authority information of the current request page of the user is loaded, the loading performance of the current request page can be improved, the website response data is improved, and the satisfaction degree of the user is further improved.
In step S230, the operating state of the system is determined.
The operating state of the system can be determined by the utilization rate of a CPU (Central Processing unit). Specifically, a threshold value, such as 10%, may be set, and when the CPU utilization is below 10%, it may be determined that the system is in an idle state.
In another embodiment, the operating state of the system may be determined according to the usage of the system bus, and if there is a margin in the system bus, the operating state of the system may be determined according to the margin in the system bus.
Step S240, if the system is idle, obtaining the full operation permission information of the user, where the full operation permission information includes the operation permission information of the relevant page of the current request page.
And when the running state of the system is determined to be idle, requesting to obtain the operation authority information of the current login user on the relevant page of the current request page.
The full operation authority information of the menu at which level of the current request page is obtained can be controlled by a parameter transmission method. Illustratively, data of the third-level menu is shared, if the operation authority of the second-level menu is to be obtained, the page of the second-level menu and the page of the third-level menu may be set as a related page, and the operation authority information of the second-level menu and the third-level menu may be obtained as full operation authority information, which may be specifically set by a system developer according to an actual situation, and is not limited herein.
It should be noted that the full-amount operation authority information does not include the lightweight operation authority information, and the sum of the full-amount operation authority information and the lightweight operation authority information is the sum of the operation authority of the user on the current request page and the operation authority of the relevant page of the current request page.
Therefore, when the system is idle, the full operation authority information is requested, and the loading of the operation authority information of the related page of the current request page and each functional module of the related page can be realized on the basis of not influencing the system use fluency of the user.
Step S250, storing the total operation authority information in the routing data of the route corresponding to each relevant page in the dynamic routing table.
First, it should be noted that path information from the current route to other routes in the dynamic routing table is also stored in the routing data.
And storing the total operation authority information in the routing data of the routes respectively corresponding to each relevant page and each functional module of each relevant page in the dynamic routing table, thereby realizing that when a user requests resources of other routes in the current route, the operation authority of the user can be judged according to the operation authority information of the user, such as addition, deletion, check, modification and the like, stored in the corresponding routing data, and then the page requested by the user is presented according to the operation authority information of the user.
Fig. 3 is a flowchart illustrating a method for controlling front-end operation authority according to an exemplary embodiment. On the basis of the embodiment of the method for controlling front-end operation authority shown in fig. 2, the method may further include step S310 and step S320.
Step S310, if request information of a user for requesting a target page is received, checking the authority of the user on the target page according to the operation authority information in the dynamic routing table to obtain a checking result, wherein the operation authority information comprises lightweight operation authority information and full operation authority information;
and step S320, displaying the page according to the verification result.
The target page is a page requested by the user, the operation authority information of the user is stored in the page and the routing data of each route corresponding to each functional module on the page, and the operation authority information comprises whether the user has the target page and the operation authority of each functional module on the page, and if the user has the operation authority, the specific type of the operation authority. Therefore, the user can be displayed with the related page according to the operation authority information stored in the routing data. According to whether the user has the target page operation authority or no operation authority, step S320 may include the following two cases:
the first condition is as follows: having operating authority
In step S321, if the user has the operation right of the target page, the target page is displayed according to the operation right information of the user.
It is easy to understand that when the user is judged to have the operation authority of the target page, the target page requested by the user is presented according to the operation authority information of the user. Illustratively, if the target page includes the function module 1 and the function module 2, the user has the editing right of the function module 1 and has the deleting right of the function module 2, and different states can be presented according to different types of the rights. The system developer can set the system according to the actual situation, and the system developer is not limited herein.
Case two: without operation authority
Step S322, if the user does not have the operation authority of the target page, returning a prompt message, wherein the prompt message is used for indicating that the user does not have the operation authority of the target page.
When the user does not have the operation right of the target page, the system may return prompt information indicating that the user does not have the operation right of the target page, where the prompt information may be an exception, or may return a page without a right, where the prompt information is not limited.
Fig. 4 is a flowchart of step S321 in another embodiment in the embodiment shown in fig. 3. In another embodiment, as shown in fig. 4, if the user has the operation right of the target page in step S321, displaying the target page according to the operation right information of the user includes the following steps S410 to S430.
Step S410, generating an authority routing table according to each route of the user with the operation authority in the dynamic routing table.
In this embodiment, after receiving the lightweight operation authority information and the global operation authority information of the user, matching the route of the user having the operation authority with the route in the dynamic routing table according to the result of the matching, and determining each route of the user having the operation authority according to the result of the matching. And generating an authority routing table according to each route of which the user has the operation authority.
Step S420, the authority routing table is converted into a routing component, and the routing component is dynamically added through the routing manager.
The routing manager is used for managing the routing components to realize the routing function. Because the authority routing table is data in a string format and the routing manager manages the components in an array structure, the authority routing table needs to be converted into routing components and then dynamically added through the routing manager.
In further embodiments, the step S420 may further include the steps of:
converting the authority routing table in a traversal and recursion mode, packaging the authority routing table into a routing component, and storing the routing component into a local storage;
the routing components are dynamically added by a routing manager.
In this embodiment, the routing component is used to encapsulate the reusable code, and the rights routing that conforms to the user's rights is encapsulated in the routing component. The user's rights routing may be stored in the local browser, which typically stores data of size 5M, even if the browser is closed and the data still exists. Specifically, because the general routes are multi-stage and nested layer by layer, a traversal recursive method is required, and by the traversal method, each route in a recursive route table is used to implement conversion from a character string to a route component, so that each route is ensured to implement conversion and finally encapsulated into a route component, and after the route component is obtained, the route component is stored in a local storage.
After obtaining the routing component, the routing component is dynamically added through the routing manager, specifically, after the routing component is registered for routing, the routing manager is called to add the routing component, so that the routing component is added to the routing manager. When an exception occurs, a route is usually skipped to the error processing route, the error processing route specifically refers to the route of the 404 page, and the 404 page is a page returned by a server without the reason that the server cannot normally provide information or the server cannot respond when a user browses a webpage. Therefore, the wrong routing is also required to be converted into a component form, and the routing component is spliced when being dynamically added by the routing manager, so that the page of the wrong routing is skipped when the page is abnormal.
And step S430, rendering the routing component through the rendering component so as to display a page according to the operation authority information of the user.
The rendering component is a component of multi-level menu dynamic rendering. Specifically, the traversal routing component acquires a routing array of the user authority, and then performs dynamic rendering according to the acquired routing array by a list rendering method, so as to finally realize the display of the menu bar with the authority.
In another embodiment, if the user has the operation right of the target page in step S321, displaying the target page according to the operation right information of the user, which may specifically include:
encapsulating a common component < auth-button/>, which can be rendered as an arbitrary label, any component, as long as it is passed a parameter (actionTag = label name you want), and no reference is passed to render as button by default. This component is used directly as the action item component, e.g., a button is originally written with < button/> and that component is replaced with < auth-button/>. All parameters and methods are directly written on the device, and the device can inherit all parameters and methods of a parent level and has excellent maintainability and expansibility. Permission control is performed inside the component, for example, permission of editing and deleting is possessed under the current route, the < auth-button action-code = 'EDIT'/> and the < auth-button action-code = 'DELETE'/> are rendered, and other conditions such as adding the < auth-button action-code = 'ADD'/> are not rendered. And if the user has the operation authority of the target page, displaying the target page through the common component.
Therefore, the functional modules of the page do not need to be processed one by one, and uniform service processing on the page according to the operation authority information of the user is realized.
In another embodiment, step S230 of the embodiment of the method for controlling front-end operation authority shown in fig. 2 may include: if the utilization rate of the CPU of the system is lower than a preset threshold value, determining that the running state of the system is idle, and if the utilization rate of the CPU of the system is larger than or equal to the preset threshold value, determining that the running state of the system is busy.
The purpose of this step is how to determine the operating state of the system, and specifically, a preset threshold may be set, and the preset threshold may be set by a system developer at will within a reasonable range, so that when the system is idle, the operation permission information of the relevant page of the current request page is loaded, and the fluency of the user using the system is ensured.
In another embodiment, on the basis of the embodiment of the control method of the front-end operation authority shown in fig. 2, in another embodiment, the step S210 may include the following steps:
acquiring user information of a logged-in user;
obtaining role information of a user according to user information of the logged-in user;
and acquiring the lightweight operation authority information of the user according to the role information.
The user is a specific operator of the system, can have own operation authority information, and can be classified into one or more user groups from 0 to N user groups according to the user information of the user. In order to perform classification management on users having similar or identical operation authority, users having similar or identical operation authority may be classified into the same role. Such as roles of system administrator, user, guest, etc. Therefore, the role information of the user can be acquired according to the user information of the logged-in user, so that the lightweight operation authority information corresponding to the role information can be acquired according to the role information of the user.
In another embodiment, on the basis of the embodiment of the method for controlling front-end operation authority shown in fig. 2, the method for controlling front-end operation authority may further include the following steps: and if the user is detected to exit the system, clearing the operation authority information of the user.
When the user logs out, the lightweight operation authority information and the global operation authority information of the user are cleared, so that the functions of preventing useless data accumulation and updating the routing data in the dynamic routing table can be realized.
Embodiments of the apparatus of the present application are described below. Fig. 5 is a block diagram illustrating a front-end operation authority control apparatus according to an exemplary embodiment, and as shown in fig. 5, the front-end operation authority control apparatus includes a first obtaining unit 501, a first storage unit 502, a determining unit 503, a second obtaining unit 504, and a second storage unit 505:
a first obtaining unit 501, configured to obtain user information of a logged-in user and obtain lightweight operation permission information of the user, where the lightweight operation permission information is operation permission information of the user on a current request page;
a first storage unit 502, configured to store the lightweight operation permission information in the routing data of a current route of the dynamic routing table, where the current route is a route corresponding to a current request page;
a determination unit 503, configured to determine an operation state of the system;
a second obtaining unit 504, configured to obtain full operation permission information of the user if the running state of the system is idle, where the full operation permission information includes operation permission information of a relevant page of the current request page;
a second storage unit 505, configured to store the full amount of operation authority information in the routing data of each route corresponding to each relevant page in the dynamic routing table, respectively.
In another exemplary embodiment, based on the foregoing scheme, the method further includes: and a validation unit. The verification unit is used for verifying the authority of the user on the target page according to the operation authority information in the dynamic routing table to obtain a verification result if the request information of the user for requesting the target page is received, wherein the operation authority information comprises lightweight operation authority information and full operation authority information; and displaying the page according to the verification result.
In another exemplary embodiment, based on the foregoing scheme, the validation unit is further configured to display the target page according to the operation authority information of the user if the user has the operation authority of the target page; and if the user does not have the operation authority of the target page, returning prompt information, wherein the prompt information is used for indicating that the user does not have the operation authority of the target page.
In another exemplary embodiment, based on the foregoing scheme, the validation unit is further configured to generate an authority routing table according to each route in the dynamic routing table, where the user has an operation authority; converting the authority routing table into a routing component and dynamically adding the routing component through a routing manager; and rendering the routing component through the rendering component so as to display a page according to the operation authority information of the user.
In another exemplary embodiment, the determining unit 503 is further configured to determine that the operating state of the system is idle if the utilization rate of the CPU of the system is lower than a preset threshold, and determine that the operating state of the system is busy if the utilization rate of the CPU of the system is greater than or equal to the preset threshold.
In another exemplary embodiment, based on the foregoing scheme, the first obtaining unit 501 is further configured to obtain user information of a logged-in user; acquiring role information of a user according to user information of a logged-in user; and acquiring the lightweight operation authority information of the user according to the role information.
In another exemplary embodiment, based on the foregoing scheme, the method further includes: and a clearing unit. The clearing unit is used for clearing the operation authority information of the user if the user is detected to exit the system.
It should be noted that the apparatus provided in the foregoing embodiment and the method provided in the foregoing embodiment belong to the same concept, and specific ways of performing operations by each functional module and unit have been described in detail in the method embodiment, and are not described herein again.
In another exemplary embodiment, the present application further provides a front-end operation authority control device, including a processor and a memory, where the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, implement the method for front-end operation authority control as described above.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a hardware structure of a front-end operation authority control device according to an exemplary embodiment.
It should be noted that the device is only an example adapted to the application and should not be considered as providing any limitation to the scope of use of the application. The device cannot be interpreted as requiring one or more functional modules in the control device that depend on or have to have the exemplary front-end operational rights shown in fig. 6.
The hardware structure of the device may have large differences due to differences in configuration or performance, as shown in fig. 6, and the device includes: a power supply 610, an interface 630, at least one memory 650, and at least one central processing unit 670.
The power supply 610 is used to provide operating voltage for each hardware device on the device.
The interface 630 includes at least one wired or wireless network interface 631, at least one serial-to-parallel conversion interface 633, at least one input/output interface 635, and at least one USB interface 637, etc. for communicating with external devices.
The memory 650 is used as a carrier of resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., on which the stored resources include an operating system 651, application programs 653, data 655, etc., and the storage mode may be a transient storage mode or a permanent storage mode. The operating system 651 is used to manage and control the hardware devices and applications 653 on the device, to perform the computation and processing of the data 655 by the central processor 670, which may be Windows server, Mac OS XTM, unix, linux, etc. The application programs 653 are computer programs that perform at least one specific task on the operating system 651, and may include at least one functional module, each of which may contain a sequence of computer-readable instructions for the device.
The central processor 670 may include one or more processors and is arranged to communicate with the memory 650 via a bus for computing and processing data 655 in the memory 650.
As described in detail above, the control device to which the front-end operation authority of the present application is applied will read a series of computer readable instructions stored in the memory 650 by the central processor 670 to complete the method of front-end operation authority control as described above.
Furthermore, the present application can also be implemented by hardware circuits or hardware circuits in combination with software instructions, and thus, the implementation of the present application is not limited to any specific hardware circuits, software, or a combination of the two.
In another exemplary embodiment, the present application further provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the control method of the front-end operation authority as described above. The computer-readable storage medium may be included in the control device of the front-end operation authority described in the above embodiment, or may be separately present and not assembled in the control device of the front-end operation authority.
The above description is only a preferred exemplary embodiment of the present application, and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make various changes and modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method for controlling front-end operation authority is characterized by comprising the following steps:
obtaining user information of a logged-in user and lightweight operation authority information of the user, wherein the lightweight operation authority information is the operation authority information of the user on a current request page, the operation authority information of the current request page comprises the current request page and the operation authority information of each functional module on the current request page, and the operation authority information of each functional module comprises added, deleted, inquired and modified authority information;
storing the lightweight operation authority information in the routing data of the current route of a dynamic routing table, wherein the current route is the route corresponding to the current request page;
determining the running state of the system;
if the running state of the system is idle, acquiring the full operation authority information of the user, wherein the full operation authority information comprises the operation authority information of a relevant page of the current request page;
storing the full operation authority information in the routing data of the route corresponding to each relevant page in the dynamic routing table;
if request information of the user for requesting a target page is received, verifying the authority of the user on the target page according to operation authority information in the dynamic routing table to obtain a verification result, wherein the operation authority information comprises the lightweight operation authority information and the full operation authority information, the dynamic routing table is a routing table which is established by a router and is automatically adjusted according to the network operation condition, and the dynamic routing table is used for storing the operation authority information and calculating a data transmission path;
and displaying a page according to the verification result.
2. The method of claim 1, wherein the displaying a page according to the verification result comprises:
if the user has the operation authority of the target page, displaying the target page according to the operation authority information of the user;
and if the user does not have the operation authority of the target page, returning prompt information, wherein the prompt information is used for indicating that the user does not have the operation authority of the target page.
3. The method according to claim 2, wherein if the user has the operation right of the target page, displaying the target page according to the operation right information of the user comprises:
generating an authority routing table according to each route of the user with the operation authority in the dynamic routing table;
converting the authority routing table into a routing component and dynamically adding the routing component through a routing manager;
rendering the routing component through a rendering component so as to display a page according to the operation authority information of the user.
4. The method of claim 1, wherein determining the operational state of the system comprises:
if the utilization rate of the CPU of the system is lower than a preset threshold value, determining that the running state of the system is idle, and if the utilization rate of the CPU of the system is larger than or equal to the preset threshold value, determining that the running state of the system is busy.
5. The method according to claim 1, wherein the obtaining user information of the logged-in user and obtaining lightweight operation authority information of the user comprises:
acquiring user information of a logged-in user;
obtaining role information of the user according to the user information of the logged-in user;
and acquiring the lightweight operation authority information of the user according to the role information.
6. The method of claim 1, further comprising:
and if the user is detected to exit the system, clearing the lightweight operation authority information and the full operation authority information of the user.
7. A control apparatus for front-end operation authority, comprising:
the first obtaining unit is used for obtaining user information of a logged-in user and obtaining lightweight operation authority information of the user, wherein the lightweight operation authority information is the operation authority information of the user on a current request page;
a first storage unit, configured to store the lightweight operation permission information in route data of a current route of a dynamic routing table, where the current route is a route corresponding to the current request page;
the determining unit is used for determining the running state of the system;
a second obtaining unit, configured to obtain full operation permission information of the user if the operating state of the system is idle, where the full operation permission information includes operation permission information of a page related to the current request page;
the second storage unit is used for storing the full-scale operation authority information in the routing data of each route corresponding to each relevant page in the dynamic routing table;
a validation unit, configured to, if request information of the user for requesting a target page is received, verify the authority of the user on the target page according to operation authority information in the dynamic routing table to obtain a verification result, where the operation authority information includes the lightweight operation authority information and the full operation authority information, the dynamic routing table is a routing table that is established by a router and is self-adjusted according to a network operation condition, and the dynamic routing table is used for storing the operation authority information and calculating a data transmission path; and displaying a page according to the verification result.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of controlling front-end operational rights according to any one of claims 1 to 6.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of controlling front-end operational rights according to any one of claims 1 to 6.
CN202010684880.4A 2020-07-16 2020-07-16 Method and device for controlling front-end operation authority and related equipment Active CN111563215B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010684880.4A CN111563215B (en) 2020-07-16 2020-07-16 Method and device for controlling front-end operation authority and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010684880.4A CN111563215B (en) 2020-07-16 2020-07-16 Method and device for controlling front-end operation authority and related equipment

Publications (2)

Publication Number Publication Date
CN111563215A CN111563215A (en) 2020-08-21
CN111563215B true CN111563215B (en) 2020-12-18

Family

ID=72073929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010684880.4A Active CN111563215B (en) 2020-07-16 2020-07-16 Method and device for controlling front-end operation authority and related equipment

Country Status (1)

Country Link
CN (1) CN111563215B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487392A (en) * 2020-12-08 2021-03-12 浪潮云信息技术股份公司 Method for realizing authority control of management system by front end
CN116701790B (en) * 2023-08-03 2023-11-07 中国电信股份有限公司 Front-end authority control method based on route and related equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020007283A1 (en) * 2000-07-11 2002-01-17 Anelli Albert M. Employee dispute resolution via a network
US9735964B2 (en) * 2008-06-19 2017-08-15 Microsoft Technology Licensing, Llc Federated realm discovery
CN104361071A (en) * 2014-11-12 2015-02-18 沈文策 Page preloading method and device
JP6683932B2 (en) * 2016-09-15 2020-04-22 株式会社バッファロー Network device, electronic device, operating method and program of electronic device, use registration method and program of network device
CN108600175B (en) * 2018-03-27 2019-09-06 深圳世联筑业科技有限公司 Control method, device and the storage medium of system operatio permission
CN109740379A (en) * 2019-01-03 2019-05-10 山东浪潮通软信息科技有限公司 A kind of front end authority control method
CN110443010B (en) * 2019-07-22 2022-05-03 安徽智恒信科技股份有限公司 Authority visual configuration control method, device, terminal and storage medium in information system
CN110535774A (en) * 2019-07-24 2019-12-03 平安科技(深圳)有限公司 Dynamic routing processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111563215A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
US10990766B2 (en) Methods and devices for processing template data, requesting template data, and presenting template data
CN109688120B (en) Dynamic authority management system based on improved RBAC model and Spring Security framework
US9805209B2 (en) Systems and methodologies for managing document access permissions
WO2018113596A1 (en) Method of processing application reviewing operation permission, device, and data storage medium
US9887990B2 (en) Protection of application passwords using a secure proxy
US20190190898A1 (en) Methods and systems for managing internet preferences
CN107450903B (en) Information processing method and device
CN111416811B (en) Unauthorized vulnerability detection method, system, equipment and storage medium
US11068583B2 (en) Management of login information affected by a data breach
CN104283875A (en) Cloud disk authority management method
CN110505162B (en) Message transmission method and device and electronic equipment
CN111988337B (en) Authority management method and system
CN107015996A (en) A kind of resource access method, apparatus and system
US20130246453A1 (en) Method of extending web service application programming interfaces using query languages
CN109889517A (en) Data processing method, permissions data collection creation method, device and electronic equipment
US10891357B2 (en) Managing the display of hidden proprietary software code to authorized licensed users
CN111563215B (en) Method and device for controlling front-end operation authority and related equipment
CN109669718A (en) System permission configuration method, device, equipment and storage medium
CN110781505B (en) System construction method and device, retrieval method and device, medium and equipment
US11882154B2 (en) Template representation of security resources
CN112527504A (en) Multi-tenant resource quota management method and device, and computer equipment
CN115878860A (en) Menu generation method, device, server equipment and medium
CN113726855A (en) Service aggregation method, device, electronic equipment and computer-readable storage medium
CN115987683B (en) Node access control method, device, equipment and medium in block chain network
CN117792704A (en) Website access method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231116

Address after: Room 2601 (Unit 07), Qianhai Free Trade Building, No. 3048, Xinghai Avenue, Nanshan Street, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Ping An Smart Healthcare Technology Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Patentee before: Ping An International Smart City Technology Co.,Ltd.