CN111241503A - Js frame-based page button authorization method - Google Patents

Js frame-based page button authorization method Download PDF

Info

Publication number
CN111241503A
CN111241503A CN202010049121.0A CN202010049121A CN111241503A CN 111241503 A CN111241503 A CN 111241503A CN 202010049121 A CN202010049121 A CN 202010049121A CN 111241503 A CN111241503 A CN 111241503A
Authority
CN
China
Prior art keywords
button
authorization
component
authority
verification
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
CN202010049121.0A
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.)
Shanghai Siic Longchuang Smarter Energy Technology Co ltd
Original Assignee
Shanghai Siic Longchuang Smarter Energy 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 Shanghai Siic Longchuang Smarter Energy Technology Co ltd filed Critical Shanghai Siic Longchuang Smarter Energy Technology Co ltd
Priority to CN202010049121.0A priority Critical patent/CN111241503A/en
Publication of CN111241503A publication Critical patent/CN111241503A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention relates to a page button authorization method based on a Vue.js frame, which comprises the following steps: step S1: acquiring a functional component in a page, and setting component authorization information according to the functional component; step S2: setting role authority information for the access authority of the system role according to the component authorization information; step S3: when the system role accesses the page, the functional component carries out authorization verification on role authority information according to the component authorization information, if the component authorization information is successful, the access authority of the corresponding functional component is opened, and if the component authorization information is failed, the corresponding system role is prompted to need the role authority information; step S4: and the functional component performs button authority verification on the system role successfully authorized and verified according to the component authorization information, displays the functional button corresponding to the functional component if the button authority verification is successful, and does not display the functional button corresponding to the functional component if the button authority verification is failed. Compared with the prior art, the method and the device have the advantages of improving the efficiency of the page authorization verification, improving the security of page access and the like.

Description

Js frame-based page button authorization method
Technical Field
The invention relates to the technical field of computers, in particular to a page button authorization method based on a Vue.
Background
In an information system, a plurality of roles are required to be set according to different business requirements, and each role can only access a specific page and function operation. The management control of the authority is related to specific pages and functions in the actual encoding process, the pages need to perform authorization verification on each new role accessing the pages, judge whether authorization can be performed or not, and authorize corresponding roles according to the judgment result, so that the queue type verification mode is repeated, and when the number of the access roles is large, a certain role is easy to ignore, and the authority distribution is caused to be problematic.
Disclosure of Invention
The invention aims to provide a page button authorization method based on a Vue.
The purpose of the invention can be realized by the following technical scheme:
js frame-based page button authorization method, comprising the following steps:
step S1: acquiring a functional component in a page, and setting component authorization information according to the functional component;
step S2: setting role authority information according to the access authority of the component authorization information to the system role;
step S3: when the system role accesses the page, the functional component carries out authorization verification on the role authority information according to the component authorization information, if the authorization verification is successful, the access authority of the corresponding functional component is opened, and if the authorization verification is failed, the corresponding system role is prompted to need the role authority information;
step S4: and the functional component carries out button authority verification on the system role successfully authorized and verified according to the component authorization information, if the button authority verification is successful, the functional button corresponding to the functional component is displayed, and if the button authority verification is failed, the functional button corresponding to the functional component is not displayed.
And the page scans the functional components through module plug-ins, identifies the component authorization information and synchronizes the component authorization information to an authorization information database.
And the page synchronizes the component authorization information to the authorization information database through a resource positioning conversion interface.
The component authorization information includes authorization identification information and button authority identification information of the functional component.
The functional component calls the authorization identification information when performing authorization verification in step S3.
The functional component calls the button authority identification information when performing button authority verification in step S4.
And a button authority attribute value is arranged in the functional component.
In the step S4, if the component authorization information satisfies the button authority attribute value, the button authority verification is successful, and if not, the button authority verification is failed.
And setting the button authority attribute value through a vue.js self-defining instruction.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention sets the component authorization information in the functional component of the page, and the functional component verifies whether the system role accessing the functional component is authorized or not, so that the authorization work is divided into various components, the authorization verification process is simplified, and the authorization verification efficiency of the page is improved.
2. The invention refines the original page authorization verification into component authorization verification and button authority verification in the component, provides richer verification modes and corresponding service contents, and simultaneously improves the security of page access.
3. The invention realizes the automatic maintenance of the component authorization information through the module plug-in, and does not need to manually synchronize the component authorization information in the corresponding code of the functional component to the right information database.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
As shown in fig. 1, a page button authorization method based on vue.js frame includes the following steps:
step S1: acquiring a functional component in a page, and setting component authorization information according to the functional component;
step S2: setting role authority information for the access authority of the system role according to the component authorization information;
step S3: when the system role accesses the page, the functional component performs authorization verification on role authority information according to the component authorization information, if the authorization verification is successful, the access authority of the corresponding functional component is opened, and if the authorization verification is failed, the corresponding system role is prompted to need the role authority information;
step S4: and the functional component performs button authority verification on the system role successfully authorized and verified according to the component authorization information, displays the functional button corresponding to the functional component if the button authority verification is successful, and does not display the functional button corresponding to the functional component if the button authority verification is failed.
And the page identifies the authorization information of the component and synchronizes the authorization information to an authorization information database through the Webpack custom plug-in scanning functional component.
The page synchronizes the component authorization information to the authorization information database through a resource location translation interface (rest interface).
The component authorization information includes authorization identification information and button authority identification information of the functional component.
The function component calls the authorization identification information when the authorization verification is performed in step S3.
The function component calls the button authority identification information at the time of button authority verification in step S4.
And a button authority attribute value v-auth is arranged in the functional component.
In step S4, if the component authorization information satisfies the button authority attribute value, the button authority verification is successful, and if not, the button authority verification is failed.
The button permission attribute value is set through a vue.
In addition, it should be noted that the specific embodiments described in the present specification may have different names, and the above descriptions in the present specification are only illustrations of the structures of the present invention. Minor or simple variations in the structure, features and principles of the present invention are included within the scope of the present invention. Various modifications or additions may be made to the described embodiments or methods may be similarly employed by those skilled in the art without departing from the scope of the invention as defined in the appending claims.

Claims (9)

1. Js frame-based page button authorization method, characterized by comprising the following steps:
step S1: acquiring a functional component in a page, and setting component authorization information according to the functional component;
step S2: setting role authority information according to the access authority of the component authorization information to the system role;
step S3: when the system role accesses the page, the functional component carries out authorization verification on the role authority information according to the component authorization information, if the authorization verification is successful, the access authority of the corresponding functional component is opened, and if the authorization verification is failed, the corresponding system role is prompted to need the role authority information;
step S4: and the functional component carries out button authority verification on the system role successfully authorized and verified according to the component authorization information, if the button authority verification is successful, the functional button corresponding to the functional component is displayed, and if the button authority verification is failed, the functional button corresponding to the functional component is not displayed.
2. Js frame based page button authorization method according to claim 1, characterized in that the page scans the functional components through module plugins, identifies the component authorization information and synchronizes to the authorization information database.
3. The Vue.js frame-based page button authorization method according to claim 2, wherein the page synchronizes the component authorization information to the authorization information database through a resource location translation interface.
4. The Vue.js frame-based page button authorization method according to claim 1, wherein the component authorization information includes authorization identification information and button authority identification information of the functional component.
5. Js frame-based page button authorization method according to claim 4, characterized in that the functional component calls the authorization identification information when authorization verification is performed in step S3.
6. Js frame-based page button authorization method according to claim 4, characterized in that the functional component calls the button authority identification information when performing button authority verification in step S4.
7. A page button authorization method based on vue.js framework according to claim 1, characterized in that the functional component is provided with a button permission attribute value.
8. The Vue. js frame-based page button authorization method as claimed in claim 7, wherein in step S4, if the component authorization information satisfies the button permission attribute value, the button permission verification is successful, and if not, the button permission verification is failed.
9. The page button authorization method based on vue.js frame as claimed in claim 7, characterized in that the button permission attribute value is set by vue.js custom instruction.
CN202010049121.0A 2020-01-16 2020-01-16 Js frame-based page button authorization method Pending CN111241503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010049121.0A CN111241503A (en) 2020-01-16 2020-01-16 Js frame-based page button authorization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010049121.0A CN111241503A (en) 2020-01-16 2020-01-16 Js frame-based page button authorization method

Publications (1)

Publication Number Publication Date
CN111241503A true CN111241503A (en) 2020-06-05

Family

ID=70872712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010049121.0A Pending CN111241503A (en) 2020-01-16 2020-01-16 Js frame-based page button authorization method

Country Status (1)

Country Link
CN (1) CN111241503A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806652A (en) * 2021-09-18 2021-12-17 武汉联影医疗科技有限公司 Page generation method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930226A (en) * 2012-10-25 2013-02-13 无锡中科泛在信息技术研发中心有限公司 Method for controlling use permission of fine-grained client
CN107342992A (en) * 2017-06-27 2017-11-10 努比亚技术有限公司 A kind of System right management method, apparatus and computer-readable recording medium
WO2018077169A1 (en) * 2016-10-31 2018-05-03 中兴通讯股份有限公司 Image repository authorization, access and management method, server, and client
CN108804946A (en) * 2018-06-12 2018-11-13 成都优易数据有限公司 A kind of table button authority control method based on Vue.js

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930226A (en) * 2012-10-25 2013-02-13 无锡中科泛在信息技术研发中心有限公司 Method for controlling use permission of fine-grained client
WO2018077169A1 (en) * 2016-10-31 2018-05-03 中兴通讯股份有限公司 Image repository authorization, access and management method, server, and client
CN107342992A (en) * 2017-06-27 2017-11-10 努比亚技术有限公司 A kind of System right management method, apparatus and computer-readable recording medium
CN108804946A (en) * 2018-06-12 2018-11-13 成都优易数据有限公司 A kind of table button authority control method based on Vue.js

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭伟光;: "一种基于角色的跨域访问授权方法" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806652A (en) * 2021-09-18 2021-12-17 武汉联影医疗科技有限公司 Page generation method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111462783A (en) Audio and video recording guiding method and device, computer equipment and storage medium
CN103927612A (en) Mobile law-enforcing system and method for environment monitoring
CN111078260B (en) WeChat applet third-party platform management method and system
CN104715181A (en) Login system and method of application software
CN113435846A (en) Business process arranging method and device, computer equipment and storage medium
CN111241503A (en) Js frame-based page button authorization method
CN106033619A (en) Picture verification code generating method, device and system
CN111651508A (en) Operation and maintenance data management method and device, electronic equipment and storage medium
CN110782233A (en) Authority management method based on OA approval and between business systems
CN113838228A (en) Command issuing method and device applied to access control management system and storage medium
CN109684802A (en) A kind of method and system providing a user artificial intelligence platform
CN101841567A (en) Domain user login-based realization method of application system integration platform
CN1567829A (en) General purpose data file conversion method
CN101770553B (en) Mobile terminal and calling method for root certificate in mobile terminal
CN115455388A (en) Authority-based hierarchical management method and system
CN104899427A (en) Online hospital platform, expert platform, and emergency expert consultation request method
CN112100187B (en) Student learning data storage method and device based on VueJS
CN106096434A (en) A kind of e-file signature method
CN105938528A (en) Control system for computer events
WO2021000488A1 (en) Automatic data importing method, device, and computer readable storage medium
CN111368179A (en) Method for realizing general operation prompt configuration and display control in cloud platform process application business approval link
CN112804647A (en) Target user tracking method, system, server and storage medium based on communication
CN109840693A (en) It attends a banquet behavior safety monitoring method, device, computer equipment and storage medium
CN101866297B (en) Method and device for generating management platform
CN109408575B (en) Data access service system

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