CN112667273A - Authority management method and device of page button, computer equipment and storage medium - Google Patents

Authority management method and device of page button, computer equipment and storage medium Download PDF

Info

Publication number
CN112667273A
CN112667273A CN202011594567.8A CN202011594567A CN112667273A CN 112667273 A CN112667273 A CN 112667273A CN 202011594567 A CN202011594567 A CN 202011594567A CN 112667273 A CN112667273 A CN 112667273A
Authority
CN
China
Prior art keywords
page
button
information
user
target
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.)
Pending
Application number
CN202011594567.8A
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011594567.8A priority Critical patent/CN112667273A/en
Publication of CN112667273A publication Critical patent/CN112667273A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The application relates to the technical field of application development, and provides a method and a device for managing authority of a page button, computer equipment and a storage medium, wherein the method comprises the following steps: generating an input page for inputting user information and generating a user list; generating an input page of input page information, and generating a page list; selecting first user information from a user list, selecting first page information from a page list, generating an input page of input button information, receiving input button information and a corresponding button identifier on the button information input page, and generating a button identifier list according to the input button information and the corresponding button identifier; and associating and storing the generated button identification list, the first user information and the first page information into a database of a server. According to the method and the device, the authority of the user on the page is directly controlled on the page, online modification is performed, the effect is achieved in real time, codes do not need to be modified, projects do not need to be issued again, and the authority control is convenient and accurate.

Description

Authority management method and device of page button, computer equipment and storage medium
Technical Field
The present application relates to the field of application development technologies, and in particular, to a method and an apparatus for managing permissions of page buttons, a computer device, and a storage medium.
Background
In the use process of the website, users often play different roles or have different levels, and various function buttons in the same page often need to perform corresponding operation authority control for the different roles or different user levels. For the requirement of high accuracy requirement of authority control, a traditional method is to perform data isolation and authority configuration in a code by a developer. If a new role is added or a new authority is changed, the code can be modified and reissued only by a developer. However, in practical application, the content of the website is diversified, the service scene and the requirement are changeable, and the code is frequently modified, so that the working efficiency is influenced.
Disclosure of Invention
The application mainly aims to provide a method and a device for managing the authority of a page button, a computer device and a storage medium, and aims to overcome the defect that codes need to be modified when the authority of the page button is managed at present.
In order to achieve the above object, the present application provides a method for managing authority of a page button, comprising the following steps:
generating a user information input page, receiving input user information on the user information input page, and generating a unique user identifier according to the input user information;
storing the user information and the unique user identifier in a database of a management end in a related manner, and generating a user list according to the user information in the database of the management end;
generating a page information input page, receiving input page information at the page information input page, and generating a corresponding page identifier according to the input page information;
storing the page information and the page identifier in a database of a management end in a correlation manner, and generating a page list in the database of the management end according to the page information;
selecting a first user information from the user list, and selecting a first page information from the page list;
generating a button information input page;
receiving the entered button information and the corresponding button identification on the button information entry page; the input button information is button information of which the first user has operation authority in the first page; when a page code is written, adding corresponding button identification fields to all buttons in the page respectively;
generating a button identification list according to the input button information and the corresponding button identification;
and associating and storing the generated button identification list, the first user information and the first page information into a database of a server.
Further, after the step of storing the generated button identifier list in association with the first user information and the first page information in a database of a server, the method includes:
when a target page is loaded, acquiring page information of the target page and target user information of a target user entering the target page;
acquiring a target button identification list of the target user with operation authority on the target page from a database of the server according to the target user information of the target user and the target page information of the target page;
acquiring a target button needing to control the authority in the target page, and acquiring a button identifier of the target button; the buttons in the target page are pre-embedded with corresponding button identification fields;
judging whether the button identifier of the target button is in a target button identifier list or not;
if so, rendering the target button on the target page and displaying; if not, rendering the target button is prohibited, and the target button is not displayed.
Further, the step of rendering the destination button on the destination page includes:
acquiring corresponding rendering data according to the button identification of the target button;
acquiring page coordinates of the target button in the target page;
and rendering the target button on the page coordinates of the target page according to the rendering data.
Further, after the step of storing the generated button identifier list in association with the first user information and the first page information in a database of a server, the method includes:
generating a first data table according to the association relationship between the button identification list and the first user information and the first page information;
and carrying out Hash calculation on the first data table to obtain a corresponding first Hash value, and storing the first Hash value in the database.
Further, the step of generating a user information entry page includes:
starting a newly-built webveiw main process, calling native window resource information from a local resource library, and rendering to obtain a native window;
acquiring a code file attribute corresponding to the webveiw from a preset configuration file;
loading a code block corresponding to the code file attribute from a local resource library;
and executing the code block, and sequentially performing resource pulling and page initialization to obtain the user information input page.
Further, the entered user information comprises a user name and a user code number;
the step of generating a unique user identifier according to the entered user information includes:
acquiring an identification character at a specified position in the user code;
matching corresponding authority levels in the database according to the identification characters; the database is stored with the corresponding relation between the identification characters and the authority levels in advance;
matching a corresponding target identification generation method in the database according to the permission level; wherein, the database stores the corresponding relationship between the authority level and the identification generation method in advance;
and generating the unique user identifier according to a target identifier generation method and based on the user name and the identifier character.
Further, the identification characters are three characters, and the user name comprises six characters;
the step of generating the unique user identifier according to the target identifier generation method and based on the user name and the user code number at least comprises the following steps:
sequentially taking out two characters from the user name according to the sequence from front to back to sequentially obtain a first character group, a second character group and a third character group;
respectively encoding the first character group, the second character group and the third character group to obtain a first encoding group, a second encoding group and a third encoding group;
sequentially taking out one character from the identification characters according to the sequence from front to back to sequentially obtain a first character, a second character and a third character;
inserting the first character into the front end of the first coding group, inserting the second character into the front end of the second coding group, and inserting the third character into the front end of the third coding group to obtain a first character string, a second character string and a third character string respectively;
and combining the first character string, the second character string and the third character string in sequence to obtain the unique user identifier.
The application also provides a device for managing the authority of the page button, which comprises:
the system comprises a first generating unit, a second generating unit and a processing unit, wherein the first generating unit is used for generating a user information input page, receiving input user information on the user information input page and generating a unique user identifier according to the input user information;
the first storage unit is used for storing the user information and the unique user identifier in a database of a management terminal in a correlated manner, and generating a user list according to the user information in the database of the management terminal;
the second generation unit is used for generating a page information input page, receiving input page information on the page information input page and generating a corresponding page identifier according to the input page information;
the second storage unit is used for storing the page information and the page identifier in a database of a management terminal in a correlation manner, and generating a page list in the database of the management terminal according to the page information;
the selection unit is used for selecting a piece of first user information from the user list and selecting a piece of first page information from the page list;
a third generating unit for generating a button information entry page;
the first receiving unit is used for receiving the input button information and the corresponding button identification on the button information input page; the input button information is button information of which the first user has operation authority in the first page; when a page code is written, adding corresponding button identification fields to all buttons in the page respectively;
the fourth generating unit is used for generating a button identification list according to the input button information and the corresponding button identification;
and the third storage unit is used for associating and storing the generated button identification list, the first user information and the first page information into a database of a server.
The present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of any of the above.
According to the method and the device for managing the authority of the page button, the computer equipment and the storage medium, an input page for inputting user information is generated, and a user list is generated; generating an input page of input page information, and generating a page list; selecting first user information from the user list, selecting first page information from the page list, generating an entry page for entering button information, receiving entered button information and a corresponding button identifier on the button information entry page, and generating a button identifier list according to the entered button information and the corresponding button identifier; and associating and storing the generated button identification list, the first user information and the first page information into a database of a server. According to the method and the device, the authority of the user on the appointed button on the page is directly controlled on the page, online modification is carried out, the effect is achieved in real time, and the code does not need to be modified and the project does not need to be reissued, so that the authority control is more convenient and accurate.
Drawings
FIG. 1 is a diagram illustrating steps of a method for managing rights of a page button according to an embodiment of the present application;
FIG. 2 is a block diagram of a device for managing rights of page buttons according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, the present application provides a method for managing authority of a page button, comprising the following steps:
step S1, generating a user information entry page, receiving the entered user information on the user information entry page, and generating a unique user identifier according to the entered user information;
step S2, storing the user information and the unique user identification in a database of a management terminal in a correlated manner, and generating a user list according to the user information in the database of the management terminal;
step S3, generating a page information entry page, receiving entered page information on the page information entry page, and generating a corresponding page identifier according to the entered page information;
step S4, storing the page information and the page identifier in a database of a management terminal in a related manner, and generating a page list in the database of the management terminal according to the page information;
step S5, selecting a first user information from the user list, and selecting a first page information from the page list;
step S6, generating a button information entry page;
step S7, receiving the entered button information and the corresponding button identification on the button information entry page; the input button information is button information of which the first user has operation authority in the first page; when a page code is written, adding corresponding button identification fields to all buttons in the page respectively;
step S8, generating a button identification list according to the entered button information and the corresponding button identification;
step S9, the generated button identifier list, the first user information and the first page information are stored in a database of a server in an associated manner.
In this embodiment, when the control right of each user to the button on each page needs to be changed, the configuration can be performed by the above method; in the configuration process, the user information, the page information and the button information of each user with operation authority in each page need to be input in advance.
Therefore, the corresponding input page can be generated to input the user information, the page information, the button information and the button identifier corresponding to the button information; after the information is input, respectively generating a user list and a page list, iteratively selecting one piece of user information and one piece of page information from the user list and the page list, inputting a button identifier corresponding to the user information and the page information, and then generating a button identifier list according to the input button identifier; and finally, the button identification list, the user information and the page information are associated and stored in a database of a server. And acquiring the association relation from a database of the server directly when the target page is loaded subsequently, so as to acquire a button identifier list of the operation authority of the user entering the target page, and further performing corresponding loading processing.
In this embodiment, after the button embedding point is made on the front-end page, the authority of the specified button on the specified page by the specified user can be directly controlled on the page, and the specified button is modified online and takes effect in real time without modifying codes and reissuing items, so that the authority control is more convenient and accurate.
It can be understood that when a subsequent page is added with a button, a website is added with a page, and a system is added with a user role, related information can be input through the page, and button authority control is performed on the added content or role, so that the button authority control of the whole website is more flexible and has stronger applicability.
In an embodiment, after the step S9 of storing the generated button identifier list in association with the first user information and the first page information in a database of a server, the method includes:
step S10, when loading a target page, acquiring page information of the target page and target user information of a target user entering the target page;
step S11, according to the target user information of the target user and the target page information of the target page, obtaining a target button identification list of the target user with operation authority on the target page from a database of the server;
step S12, obtaining a target button needing control authority in the target page, and obtaining a button identifier of the target button; the buttons in the target page are pre-embedded with corresponding button identification fields;
step S13, judging whether the button mark of the target button is in the target button mark list;
step S14, if yes, rendering the target button on the target page and displaying; if not, rendering the target button is prohibited, and the target button is not displayed.
In this embodiment, when loading a target page, the target page has a plurality of buttons, and different users have different operation rights, that is, not all the users have operation rights. In this embodiment, when the user does not have the operation right for the button, the rendering and display of the button is not performed in the destination page.
Specifically, as described in step S10 above, when the target page is loaded, it needs to be determined which specific page the target page is, and which specific user needs to enter the target page, so that the page information of the target page and the user information of the user entering the target page need to be acquired.
As described in step S11, an association relationship between the user information, the page information, and the button identifier list having the operation authority is previously configured in the database of the server, and according to the association relationship, when the user information of the user and the page information of the target page are obtained, the button identifier list having the operation authority of the user on the target page may be matched, and the button identifiers corresponding to all the buttons having the operation authority of the user on the target page are described in the button identifier list.
As described in step S12, since the buttons in the target page are all pre-dotted with the corresponding button identifier fields, when the target page is loaded, the target buttons that need the control authority in the target page are acquired, and the button identifiers corresponding to all the target buttons can be acquired.
As described in the foregoing steps S13-S14, the obtained button identifier of the target button is compared with the obtained list of button identifiers, and if the button identifier of the target button exists in the list of button identifiers, it indicates that the current user has an operation right on the wood button corresponding to the button identifier, and a rendering and displaying of the target button is required; if the identification information of the target button does not exist in the button identification list, the current user does not have the operation authority for the target button corresponding to the button identification, the target button does not need to be rendered, and the target button is not displayed.
In one embodiment, the step S14 of rendering the destination button on the destination page includes:
acquiring corresponding rendering data according to the button identification of the target button;
acquiring page coordinates of the target button in the target page;
and rendering the target button on the page coordinates of the target page according to the rendering data.
In the present embodiment, rendering data of each button is stored locally, wherein the rendering data is stored in association with the button identifier. When the target button needs to be rendered, the button identification of the target button and the page coordinate in the target page need to be obtained, rendering data are obtained according to the button identification, the button is directly rendered at the corresponding page coordinate according to the rendering data, and after the rendering is completed, the button is displayed.
In an embodiment, after the step S9 of storing the generated button identifier list in association with the first user information and the first page information in a database of a server, the method includes:
generating a first data table according to the association relationship between the button identification list and the first user information and the first page information;
and carrying out Hash calculation on the first data table to obtain a corresponding first Hash value, and storing the first Hash value in the database.
In this embodiment, since the association relationship between the button identifier list and the first user information and the first page information stores button authority information of different users in different pages, if the association relationship is tampered, correct rendering of a target button may be affected when the target button of the target page is subsequently loaded. Thus, in an embodiment, a verification field may be added, the value of which is assigned to the first hash value. Before loading the target page, it is necessary to first verify whether the association relationship is tampered, and at this time, it is only necessary to obtain the association relationship between the button identifier list of the current database and the first user information and the first page information, and generate a second data table from the association relationship, where a generation manner of generating the second data table is consistent with the manner of generating the first data table. Further performing hash calculation on the second data table to obtain a corresponding second hash value; and finally, verifying whether the second hash value is consistent with the first hash value, if so, indicating that the association relation between the button identifier list in the database and the first user information and the first page information is not tampered, and loading a target page. If the button identifiers are inconsistent with the first user information, it is indicated that the association relation between the button identifier list in the database and the first page information is tampered, and at this time, the target page is not suitable to be loaded, so that insecurity of the target page is avoided.
In one embodiment, the step S1 of generating the user information entry page includes:
step S101, starting a newly-built webveiw main process, calling native window resource information from a local resource library, and rendering to obtain a native window;
step S102, acquiring code file attributes corresponding to the webveiw from a preset configuration file;
step S103, loading a code block corresponding to the code file attribute from a local resource library;
and step S104, executing the code block, and sequentially performing resource pulling and page initialization to obtain the user information input page.
In this embodiment, in the process of creating a new page, two processes are required, namely a process of creating a webveiw to generate a native window and a process of loading a code block of the webveiw; the native window is used for displaying a page of a subsequent request, the loading of the code block of the webveiw is to ensure the normal operation of the newly-built webveiw, after the code block of the webveiw is executed, the page calls local resources to perform web initialization, resource pulling and page initialization resources are further performed on the webveiw, the process belongs to page rendering in the page loading process, and static resource initialization is achieved to obtain the user information entry page.
It can be understood that the generation process of the page information entry page and the button information entry page is similar to the process of generating the user information entry page, and is not described herein again.
In one embodiment, the entered user information includes a user name and a user code;
the step S1 of generating a unique user identifier according to the entered user information includes:
step S110, obtaining an identification character at a specified position in the user code;
step S120, matching corresponding authority levels in the database according to the identification characters; the database is stored with the corresponding relation between the identification characters and the authority levels in advance;
step S130, according to the authority level, matching a corresponding target identification generation method in the database; wherein, the database stores the corresponding relationship between the authority level and the identification generation method in advance;
step S140, generating the unique user identifier according to a target identifier generation method and based on the user name and the identifier character.
In this embodiment, the user name is usually a real name of the user, or a pinyin abbreviation of the real name, and the user code is a code assigned by the enterprise to the user, and the user code may carry identification characters, such as AA, AX, ICO, and the like, and different identification characters represent different authority levels of the user. The users with different permission levels correspond to different identification generation methods, namely the identification generation methods for generating unique user identifications are different corresponding to different users.
In one embodiment, the identification characters are three characters, and the user name includes six characters;
the step S140 of generating the unique user identifier according to the target identifier generation method and based on the user name and the user code number at least includes:
step S14a, sequentially taking out two characters from the user name according to the sequence from front to back, and sequentially obtaining a first character group, a second character group and a third character group;
step S14b, respectively encoding the first character set, the second character set, and the third character set to obtain a first encoded set, a second encoded set, and a third encoded set;
step S14c, sequentially taking out one character from the identification characters according to the sequence from front to back, and sequentially obtaining a first character, a second character and a third character;
step S14d, inserting the first character into the front end of the first encoding group, inserting the second character into the front end of the second encoding group, and inserting the third character into the front end of the third encoding group, so as to obtain a first character string, a second character string, and a third character string, respectively;
step S14e, sequentially combining the first character string, the second character string, and the third character string to obtain the unique user identifier.
In this embodiment, the unique user identifier is generated by combining the user name and the identifier character; the finally generated unique user identifier comprises a plurality of user information, and the identifier character is divided into a plurality of characters to be inserted into the user name, so that the characters in the user name can be disordered, and simultaneously, the unique user identifier can carry various user information. Further, in order to avoid direct display of the user name, the user name is divided into three groups of character groups and is respectively encoded, so that the characters in the user name have stronger privacy, namely, the user name is prevented from being directly displayed in the unique user identifier, and the privacy is improved. It can be understood that the unique user identifier includes information obtained after encoding characters in the user name and identification characters in the user code, the requirement on privacy of the identification characters is not high, encoding can be omitted, and the permission level of the user can be conveniently and intuitively displayed from the unique user identifier. In some embodiments, the identification characters may also be encoded or converted when the unique user identification is generated.
In an embodiment, the method for managing the authority of the page button further includes:
the data is stored in a blockchain. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
Referring to fig. 2, an embodiment of the present application further provides a device for managing permissions of page buttons, including:
the first generating unit 10 is configured to generate a user information entry page, receive, on the user information entry page, entered user information, and generate a unique user identifier according to the entered user information;
a first storage unit 20, configured to store the user information and the unique user identifier in a database of a management end in a correlated manner, and generate a user list according to the user information in the database of the management end;
the second generating unit 30 is configured to generate a page information entry page, receive, at the page information entry page, entered page information, and generate a corresponding page identifier according to the entered page information;
the second storage unit 40 is configured to store the page information and the page identifier in a database of a management end in a correlated manner, and generate a page list in the database of the management end according to the page information;
a selecting unit 50, configured to select a first user information from the user list, and select a first page information from the page list;
a third generating unit 60 for generating a button information entry page;
a first receiving unit 70, configured to receive, on the button information entry page, entered button information and a corresponding button identifier; the input button information is button information of which the first user has operation authority in the first page; when a page code is written, adding corresponding button identification fields to all buttons in the page respectively;
a fourth generating unit 80, configured to generate a button identifier list according to the entered button information and the corresponding button identifier;
a third storage unit 90, configured to store the generated button identifier list, the first user information, and the first page information in a database of a server in an associated manner.
In one embodiment, the device for managing the authority of the page button comprises:
the first acquisition unit is used for acquiring page information of a target page and target user information of a target user entering the target page when the target page is loaded;
a second obtaining unit, configured to obtain, from a database of the server, a target button identifier list that the target user has an operation right on the target page according to target user information of the target user and target page information of the target page;
the third acquisition unit is used for acquiring a target button needing to control the authority in the target page and acquiring a button identifier of the target button; the buttons in the target page are pre-embedded with corresponding button identification fields;
a judging unit, configured to judge whether the button identifier of the target button is in a target button identifier list;
the rendering unit is used for rendering the target button on the target page and displaying the target button if the target button is on the target page; if not, rendering the target button is prohibited, and the target button is not displayed.
In one embodiment, the rendering unit renders the destination button on the destination page, including:
acquiring corresponding rendering data according to the button identification of the target button;
acquiring page coordinates of the target button in the target page;
and rendering the target button on the page coordinates of the target page according to the rendering data.
In one embodiment, the apparatus for managing authority of page button further includes:
a fifth generating unit, configured to generate a first data table according to an association relationship between the button identifier list and the first user information and the first page information;
and the Hash calculation unit is used for carrying out Hash calculation on the first data table to obtain a corresponding first Hash value and storing the first Hash value in the database.
In one embodiment, the step of generating the user information entry page by the first generating unit 10 includes:
starting a newly-built webveiw main process, calling native window resource information from a local resource library, and rendering to obtain a native window;
acquiring a code file attribute corresponding to the webveiw from a preset configuration file;
loading a code block corresponding to the code file attribute from a local resource library;
and executing the code block, and sequentially performing resource pulling and page initialization to obtain the user information input page.
In one embodiment, the entered user information includes a user name and a user code;
the first generation unit 10 includes:
the obtaining subunit is used for obtaining the identification character at the specified position in the user code;
the first matching subunit is used for matching the corresponding authority level in the database according to the identification character; the database is stored with the corresponding relation between the identification characters and the authority levels in advance;
the second matching subunit is used for matching a corresponding target identifier generation method in the database according to the authority level; wherein, the database stores the corresponding relationship between the authority level and the identification generation method in advance;
and the generating subunit is used for generating the unique user identifier according to a target identifier generating method and based on the user name and the identifier character.
In one embodiment, the identification characters are three characters, and the user name includes six characters;
the generating subunit includes at least:
the first extracting module is used for sequentially extracting two characters from the user name according to the sequence from front to back to sequentially obtain a first character group, a second character group and a third character group;
the encoding module is used for encoding the first character group, the second character group and the third character group respectively to obtain a first encoding group, a second encoding group and a third encoding group;
the second extraction module is used for sequentially extracting one character from the identification characters according to the sequence from front to back to sequentially obtain a first character, a second character and a third character;
the inserting module is used for inserting the first character into the front end of the first coding group, inserting the second character into the front end of the second coding group, and inserting the third character into the front end of the third coding group to respectively obtain a first character string, a second character string and a third character string;
and the combination module is used for sequentially combining the first character string, the second character string and the third character string to obtain the unique user identifier.
In this embodiment, please refer to the method described in the above embodiment for specific implementation of each unit, subunit, and module in the above apparatus embodiment, which is not described herein again.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the association relation of page buttons and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of rights management for page buttons.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is only a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects may be applied.
An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing a method for rights management of a page button. It is to be understood that the computer-readable storage medium in the present embodiment may be a volatile-readable storage medium or a non-volatile-readable storage medium.
In summary, for the method and apparatus for managing authority of a page button, a computer device and a storage medium provided in the embodiments of the present application, an entry page for entering user information is generated, and a user list is generated; generating an input page of input page information, and generating a page list; selecting first user information from the user list, selecting first page information from the page list, generating an entry page for entering button information, receiving entered button information and a corresponding button identifier on the button information entry page, and generating a button identifier list according to the entered button information and the corresponding button identifier; and associating and storing the generated button identification list, the first user information and the first page information into a database of a server. According to the method and the device, the authority of the user on the appointed button on the page is directly controlled on the page, online modification is carried out, the effect is achieved in real time, and the code does not need to be modified and the project does not need to be reissued, so that the authority control is more convenient and accurate.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only for the preferred embodiment of the present application and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

Claims (10)

1. A method for managing authority of a page button is characterized by comprising the following steps:
generating a user information input page, receiving input user information on the user information input page, and generating a unique user identifier according to the input user information;
storing the user information and the unique user identifier in a database of a management end in a related manner, and generating a user list according to the user information in the database of the management end;
generating a page information input page, receiving input page information at the page information input page, and generating a corresponding page identifier according to the input page information;
storing the page information and the page identifier in a database of a management end in a correlation manner, and generating a page list in the database of the management end according to the page information;
selecting a first user information from the user list, and selecting a first page information from the page list;
generating a button information input page;
receiving the entered button information and the corresponding button identification on the button information entry page; the input button information is button information of which the first user has operation authority in the first page; when a page code is written, adding corresponding button identification fields to all buttons in the page respectively;
generating a button identification list according to the input button information and the corresponding button identification;
and associating and storing the generated button identification list, the first user information and the first page information into a database of a server.
2. The method for managing authority of page button according to claim 1, wherein after the step of storing the generated button identifier list in association with the first user information and the first page information in a database of a server, the method comprises:
when a target page is loaded, acquiring page information of the target page and target user information of a target user entering the target page;
acquiring a target button identification list of the target user with operation authority on the target page from a database of the server according to the target user information of the target user and the target page information of the target page;
acquiring a target button needing to control the authority in the target page, and acquiring a button identifier of the target button; the buttons in the target page are pre-embedded with corresponding button identification fields;
judging whether the button identifier of the target button is in a target button identifier list or not;
if so, rendering the target button on the target page and displaying; if not, rendering the target button is prohibited, and the target button is not displayed.
3. The method for managing authority of page button according to claim 2, wherein said step of rendering said target button on said target page comprises:
acquiring corresponding rendering data according to the button identification of the target button;
acquiring page coordinates of the target button in the target page;
and rendering the target button on the page coordinates of the target page according to the rendering data.
4. The method for managing authority of page button according to claim 1, wherein after the step of storing the generated button identifier list in association with the first user information and the first page information in a database of a server, the method comprises:
generating a first data table according to the association relationship between the button identification list and the first user information and the first page information;
and carrying out Hash calculation on the first data table to obtain a corresponding first Hash value, and storing the first Hash value in the database.
5. The method for managing the authority of a page button according to claim 1, wherein said step of generating a user information entry page comprises:
starting a newly-built webveiw main process, calling native window resource information from a local resource library, and rendering to obtain a native window;
acquiring a code file attribute corresponding to the webveiw from a preset configuration file;
loading a code block corresponding to the code file attribute from a local resource library;
and executing the code block, and sequentially performing resource pulling and page initialization to obtain the user information input page.
6. The method for managing authority of page buttons according to claim 1, wherein said entered user information includes user name, user code number;
the step of generating a unique user identifier according to the entered user information includes:
acquiring an identification character at a specified position in the user code;
matching corresponding authority levels in the database according to the identification characters; the database is stored with the corresponding relation between the identification characters and the authority levels in advance;
matching a corresponding target identification generation method in the database according to the permission level; wherein, the database stores the corresponding relationship between the authority level and the identification generation method in advance;
and generating the unique user identifier according to a target identifier generation method and based on the user name and the identifier character.
7. The method of claim 6, wherein the identification character is three characters, and the user name includes six characters;
the step of generating the unique user identifier according to the target identifier generation method and based on the user name and the user code number at least comprises the following steps:
sequentially taking out two characters from the user name according to the sequence from front to back to sequentially obtain a first character group, a second character group and a third character group;
respectively encoding the first character group, the second character group and the third character group to obtain a first encoding group, a second encoding group and a third encoding group;
sequentially taking out one character from the identification characters according to the sequence from front to back to sequentially obtain a first character, a second character and a third character;
inserting the first character into the front end of the first coding group, inserting the second character into the front end of the second coding group, and inserting the third character into the front end of the third coding group to obtain a first character string, a second character string and a third character string respectively;
and combining the first character string, the second character string and the third character string in sequence to obtain the unique user identifier.
8. A rights management device for a page button, comprising:
the system comprises a first generating unit, a second generating unit and a processing unit, wherein the first generating unit is used for generating a user information input page, receiving input user information on the user information input page and generating a unique user identifier according to the input user information;
the first storage unit is used for storing the user information and the unique user identifier in a database of a management terminal in a correlated manner, and generating a user list according to the user information in the database of the management terminal;
the second generation unit is used for generating a page information input page, receiving input page information on the page information input page and generating a corresponding page identifier according to the input page information;
the second storage unit is used for storing the page information and the page identifier in a database of a management terminal in a correlation manner, and generating a page list in the database of the management terminal according to the page information;
the selection unit is used for selecting a piece of first user information from the user list and selecting a piece of first page information from the page list;
a third generating unit for generating a button information entry page;
the first receiving unit is used for receiving the input button information and the corresponding button identification on the button information input page; the input button information is button information of which the first user has operation authority in the first page; when a page code is written, adding corresponding button identification fields to all buttons in the page respectively;
the fourth generating unit is used for generating a button identification list according to the input button information and the corresponding button identification;
and the third storage unit is used for associating and storing the generated button identification list, the first user information and the first page information into a database of a server.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011594567.8A 2020-12-29 2020-12-29 Authority management method and device of page button, computer equipment and storage medium Pending CN112667273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011594567.8A CN112667273A (en) 2020-12-29 2020-12-29 Authority management method and device of page button, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011594567.8A CN112667273A (en) 2020-12-29 2020-12-29 Authority management method and device of page button, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112667273A true CN112667273A (en) 2021-04-16

Family

ID=75411923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011594567.8A Pending CN112667273A (en) 2020-12-29 2020-12-29 Authority management method and device of page button, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112667273A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254832A (en) * 2021-05-27 2021-08-13 平安普惠企业管理有限公司 Webpage menu configuration method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254832A (en) * 2021-05-27 2021-08-13 平安普惠企业管理有限公司 Webpage menu configuration method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109784922B (en) Electronic contract signing method, electronic contract signing device, computer equipment and storage medium
CN110135129B (en) Code segment protection method and device, computer equipment and storage medium
CN108287823B (en) Message data processing method and device, computer equipment and storage medium
CN111191221A (en) Method and device for configuring authority resources and computer readable storage medium
CN111324905A (en) Image data labeling method and device, computer equipment and storage medium
CN112637282B (en) Information pushing method and device, computer equipment and storage medium
CN110839014B (en) Authentication method, authentication device, computer equipment and readable storage medium
CN108874661B (en) Test mapping relation library generation method and device, computer equipment and storage medium
CN112949275B (en) Method, device, equipment and storage medium for importing electronic form into database
CN116484437A (en) Asset information management method and device and computer equipment
CN111552535A (en) Interface picture replacing method and device, computer equipment and storage medium
CN112528201A (en) Method and device for calling third-party platform, computer equipment and storage medium
CN113706138B (en) Payment method, device, equipment and storage medium based on digital currency hard wallet
CN112667273A (en) Authority management method and device of page button, computer equipment and storage medium
CN111708971A (en) Page configuration method and device, computer equipment and storage medium
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN112433753A (en) Interface document generation method, device, equipment and medium based on parameter information
CN115934129A (en) Software project updating method and device, computer equipment and storage medium
CN114817903A (en) Vaccination verification system, method and contract platform based on intelligent contract
CN113254832A (en) Webpage menu configuration method and device, computer equipment and storage medium
CN114138734A (en) Web-based version management method facing database and file resource
CN111523867B (en) Personnel information management method, computer device and storage medium
CN108829404B (en) Number burning method and device for terminal equipment, terminal equipment and readable storage medium
CN113469588A (en) Safety positioning management method, device, equipment and computer program product
CN112434505A (en) Template generation method and device, computer equipment and storage 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