CN104317933A - Authority control tag display method and system - Google Patents
Authority control tag display method and system Download PDFInfo
- Publication number
- CN104317933A CN104317933A CN201410602561.9A CN201410602561A CN104317933A CN 104317933 A CN104317933 A CN 104317933A CN 201410602561 A CN201410602561 A CN 201410602561A CN 104317933 A CN104317933 A CN 104317933A
- Authority
- CN
- China
- Prior art keywords
- label
- module
- boolean value
- user right
- labels class
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
The invention relates to an authority control tag display method and system. The method includes the following steps: firstly, performing user login, and receiving user authority information and an access request by a tag; secondly, invoking a tag class in the tag, and matching the user authority information with preset authority information to generate a boolean value by the tag class; thirdly, returning the boolean value to the tag through the tag class; fourthly, judging whether the boolean value is true or false, if true, executing the fifth step, and if false, executing the six step; fifthly, displaying tag content and finishing; sixthly, hiding the tag content and finishing. Repeated redundant codes are decreased, authorities are acquired actively, and compiling is concise and clear. Different display authorities can be controlled according to different login information.
Description
Technical field
The present invention relates to a kind of control of authority label display method and system, belong to telecommunications and other operator's industries, jsp/java technical field.
Background technology
Jsp page elements carries display:none or type=hidden, but to be all initiative must hide for these, has no idea to be controlled by some authority, and so we are with c:if label (this is propelling movement foreground, backstage Passive Control); Problems existing is, it is obviously infeasible for writing if else with java code.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of control of authority label display method being carried out active obtaining displaying authority by JSP.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of control of authority label display method, specifically comprises the following steps:
Step 1: user logs in, and label receives user right information and request of access;
Step 2: call the labels class in label, user right information and default access information carry out mating generation boolean value by labels class;
Step 3: boolean value is turned back to label by labels class;
Step 4: judge that boolean value is true or false, if true, performs step 5; If false, perform 6;
Step 5: shown by label substance, terminates;
Step 6: hide label substance, terminates.
The invention has the beneficial effects as follows: the present invention can flexibly by a series of logics on backstage, whether the content deciding to be included in inside tags resolves displaying, and the reception of foreground label only has boolean, unified interface, background logic can need to change flexibly according to realization; Reduce repeated and redundant code, active obtaining authority, writes short and sweet.Effectively can solve and control different displaying authority according to different log-on message.
On the basis of technique scheme, the present invention can also do following improvement.
Further, in described step 2, there are two kinds of situations in user right information and default access information matches result, if user right information and default access information matches, the boolean value of generation is true; If user right information is not mated with default access information, the boolean value of generation is false.
Further, user right information and default access information are carried out matching process and are comprised the following steps by described labels class:
Step 2.1: user right information is mated with the default access information of preserving in labels class by labels class, if coupling, produces the boolean value that is true, performs step 3; Otherwise, perform step 2.2;
Step 2.2: labels class calls the default access information stored in back-end data and mates with user right information, if coupling, produces the boolean value that is true, performs step 3; Otherwise, produce the boolean value that is false, perform step 3.
Further, described labels class is PowerTag labels class.
Technical matters to be solved by this invention is to provide a kind of control of authority label display system being carried out active obtaining displaying authority by JSP.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of control of authority label display system, comprises receiver module, calling module, feedback module, judge module and display module;
Described receiver module is used for user and logs in, and label receives user right information and request of access;
Described calling module is for calling the labels class in label, and user right information and default access information carry out mating generation boolean value by labels class;
Described feedback module is used for making labels class that boolean value is turned back to label;
Label substance, for judging that boolean value is true or false, if true, is sent to display module by described judge module; If false, hide label substance;
Label substance is shown by described display module.
The invention has the beneficial effects as follows: the present invention can flexibly by a series of logics on backstage, whether the content deciding to be included in inside tags resolves displaying, and the reception of foreground label only has boolean, unified interface, background logic can need to change flexibly according to realization; Reduce repeated and redundant code, active obtaining authority, writes short and sweet.Effectively can solve and control different displaying authority according to different log-on message.
On the basis of technique scheme, the present invention can also do following improvement.
Further, in described calling module, there are two kinds of situations in user right information and default access information matches result, if user right information and default access information matches, the boolean value of generation is true; If user right information is not mated with default access information, the boolean value of generation is false.
Further, described calling module comprises labels class module and background module;
Described labels class module is used for user right information to mate with the default access information of preserving in labels class;
Described background module mates with user right information for calling the default access information stored in back-end data.
Further, described labels class is PowerTag labels class.
Accompanying drawing explanation
Fig. 1 is a kind of control of authority label display method flow diagram of the present invention;
Fig. 2 is a kind of control of authority label display system architecture diagram of the present invention;
Fig. 3 is a kind of control of authority label display system of the present invention specifically enforcement figure.
In accompanying drawing, the list of parts representated by each label is as follows:
1, receiver module, 2, calling module, 3, feedback module, 4, judge module, 5, display module, 21, labels class module, 22, background module.
Embodiment
Be described principle of the present invention and feature below in conjunction with accompanying drawing, example, only for explaining the present invention, is not intended to limit scope of the present invention.
As shown in Figure 1, be a kind of control of authority label display method of the present invention, specifically comprise the following steps:
Step 1: user logs in, and label receives user right information and request of access;
Step 2: user right information is mated with the default access information of preserving in labels class by labels class, if coupling, produces the boolean value that is true, performs step 4; Otherwise, perform step 3;
Step 3: labels class calls the default access information stored in back-end data and mates with user right information, if coupling, produces the boolean value that is true, performs step 4; Otherwise, produce the boolean value that is false, perform step 4.
Step 4: boolean value is turned back to label by labels class;
Step 5: judge that boolean value is true or false, if true, performs step 6; If false, perform 7;
Step 6: shown by label substance, terminates;
Step 7: hide label substance, terminates.
, there are two kinds of situations in described user right information and default access information matches result, if user right information and default access information matches, the boolean value of generation is true; If user right information is not mated with default access information, the boolean value of generation is false.
Described labels class is PowerTag labels class.
As shown in Figure 2, be a kind of control of authority label display system of the present invention, comprise receiver module 1, calling module 2, feedback module 3, judge module 4 and display module 5;
Described receiver module 1 logs in for user, and label receives user right information and request of access;
Described calling module 2 is for calling the labels class in label, and user right information and default access information carry out mating generation boolean value by labels class;
Boolean value is turned back to label for making labels class by described feedback module 3;
Label substance, for judging that boolean value is true or false, if true, is sent to display module by described judge module 4; If false, hide label substance;
Label substance is shown by described display module 5.
In described calling module, there are two kinds of situations in user right information and default access information matches result, if user right information and default access information matches, the boolean value of generation is true; If user right information is not mated with default access information, the boolean value of generation is false.
Described calling module 2 comprises labels class module 21 and background module 22;
Described labels class module 21 is for mating user right information with the default access information of preserving in labels class;
Described background module 22 mates with user right information for calling the default access information stored in back-end data.
As shown in Figure 3, for a kind of control of authority label display system of the present invention specifically implements figure, its flow process is as follows:
Interface, foreground receives the request of access, when page parsing is to this label, can jump to PowerTag labels class;
Labels class receives displaying capability identification, gives key-course and service layer's process interrelated logic;
Judge according to corresponding data, return to label boolean value;
Whether the content that inside tags is decided to be included according to this value in interface, foreground carries out parsing displaying;
Creation point of the present invention is just can flexibly by a series of logics on backstage, whether the content deciding to be included in inside tags resolves displaying, and the reception of foreground label only has boolean, unified interface, background logic can need to change flexibly according to realization.
In view of background technology, the technical problem to be solved in the present invention is carried out active obtaining by JSP exactly and is shown authority, and this is the label of a dirigibility, has partial function can customize.Label is unified receives boolean types value.
According to permission ID (user-defined identification, i.e. a property value of label), the present invention mainly judges whether the content being included in inside tags shows.Be mainly used in the page needing dynamically to judge showing interface authority.What its label received is only a boolean value, unified entrance, determines whether showing by this boolean value, and emphasis and flexibly point are how to judge what this boolean value is.The key-course that label calls can call service layer flexibly, or even can just determine what boolean value is, it is completely open for being equivalent to label rear end at key-course.As long as the stated type returning unified entrance to label can realize.
Here is label tld file content and effect:
Use sample: <p:power pid=" xxxx " >
<input?type="text"value="SUNHAO"/>
</p:power>
Specific embodiment is as follows:
2. introduce powerTag
A boolean types value is obtained by calling powerController.getPowerRight method
3. introduce PowerController controller
Realization in the CRM2.0 of Shanxi have invoked control of authority service, returns boolean value, can self-defining background service in the use of reality, arbitrarily assembles, as long as meet the types value that Tag receives.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (8)
1. a control of authority label display method, is characterized in that, specifically comprises the following steps:
Step 1: user logs in, and label receives user right information and request of access;
Step 2: call the labels class in label, user right information and default access information carry out mating generation boolean value by labels class;
Step 3: boolean value is turned back to label by labels class;
Step 4: judge that boolean value is true or false, if true, performs step 5; If false, perform 6;
Step 5: shown by label substance, terminates;
Step 6: hide label substance, terminates.
2. a kind of control of authority label display method according to claim 1, is characterized in that, in described step 2, user right information and default access information matches result, there are two kinds of situations, if user right information and default access information matches, the boolean value of generation is true; If user right information is not mated with default access information, the boolean value of generation is false.
3. a kind of control of authority label display method according to claim 2, is characterized in that, user right information and default access information are carried out matching process and comprised the following steps by described labels class:
Step 2.1: user right information is mated with the default access information of preserving in labels class by labels class, if coupling, produces the boolean value that is true, performs step 3; Otherwise, perform step 2.2;
Step 2.2: labels class calls the default access information stored in back-end data and mates with user right information, if coupling, produces the boolean value that is true, performs step 3; Otherwise, produce the boolean value that is false, perform step 3.
4. a kind of control of authority label display method according to any one of claim 1-3, it is characterized in that, described labels class is PowerTag labels class.
5. a control of authority label display system, is characterized in that, comprises receiver module, calling module, feedback module, judge module and display module;
Described receiver module is used for user and logs in, and label receives user right information and request of access;
Described calling module is for calling the labels class in label, and user right information and default access information carry out mating generation boolean value by labels class;
Described feedback module is used for making labels class that boolean value is turned back to label;
Label substance, for judging that boolean value is true or false, if true, is sent to display module by described judge module; If false, hide label substance;
Label substance is shown by described display module.
6. a kind of control of authority label display system according to claim 5, is characterized in that, in described calling module, user right information and default access information matches result, there are two kinds of situations, if user right information and default access information matches, the boolean value of generation is true; If user right information is not mated with default access information, the boolean value of generation is false.
7. a kind of control of authority label display system according to claim 6, it is characterized in that, described calling module comprises labels class module and background module;
Described labels class module is used for user right information to mate with the default access information of preserving in labels class;
Described background module mates with user right information for calling the default access information stored in back-end data.
8. a kind of control of authority label display system according to any one of claim 5-7, it is characterized in that, described labels class is PowerTag labels class.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410602561.9A CN104317933A (en) | 2014-10-31 | 2014-10-31 | Authority control tag display method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410602561.9A CN104317933A (en) | 2014-10-31 | 2014-10-31 | Authority control tag display method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104317933A true CN104317933A (en) | 2015-01-28 |
Family
ID=52373165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410602561.9A Pending CN104317933A (en) | 2014-10-31 | 2014-10-31 | Authority control tag display method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104317933A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105227560A (en) * | 2015-10-14 | 2016-01-06 | 浪潮集团有限公司 | A kind of method of control of authority and device |
CN106503578A (en) * | 2016-09-30 | 2017-03-15 | 东软集团股份有限公司 | The list authority control method rendered for control and device |
CN107341388A (en) * | 2017-06-19 | 2017-11-10 | 东软集团股份有限公司 | Access right control method and device |
CN110610072A (en) * | 2019-09-06 | 2019-12-24 | 武汉达梦数据库有限公司 | Data authentication method and device |
CN114967992A (en) * | 2021-02-26 | 2022-08-30 | 北京字跳网络技术有限公司 | Information interaction method, label viewing method and device |
CN114969689A (en) * | 2021-02-26 | 2022-08-30 | 北京字跳网络技术有限公司 | Information processing method and device |
CN114969688A (en) * | 2021-02-26 | 2022-08-30 | 北京字跳网络技术有限公司 | Information processing method and device |
WO2022179598A1 (en) * | 2021-02-26 | 2022-09-01 | 北京字跳网络技术有限公司 | Information processing, information interaction, tag viewing and information display method and apparatus |
CN115134104A (en) * | 2021-03-25 | 2022-09-30 | 北京字跳网络技术有限公司 | Information processing method, information display method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103020498A (en) * | 2012-11-19 | 2013-04-03 | 广东亚仿科技股份有限公司 | Intelligent dynamic access control method and system |
CN103632082A (en) * | 2013-12-10 | 2014-03-12 | 惠州华阳通用电子有限公司 | Universal permission management system and universal permission management method |
-
2014
- 2014-10-31 CN CN201410602561.9A patent/CN104317933A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103020498A (en) * | 2012-11-19 | 2013-04-03 | 广东亚仿科技股份有限公司 | Intelligent dynamic access control method and system |
CN103632082A (en) * | 2013-12-10 | 2014-03-12 | 惠州华阳通用电子有限公司 | Universal permission management system and universal permission management method |
Non-Patent Citations (3)
Title |
---|
ZHANGCHANGGONG: "采用自定义标签控制页面功能按钮的显示", 《新浪博客,HTTP://BLOG.SINA.COM.CN/S/BLOG_A2DE16F401016CPC.HTLM》 * |
徐小平,夏保芹,迟增晓: "《JSP程序设计实训与案例教程》", 31 August 2014, 清华大学出版社 * |
肖平: "基于Spring的出版社信息管理***的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105227560A (en) * | 2015-10-14 | 2016-01-06 | 浪潮集团有限公司 | A kind of method of control of authority and device |
CN106503578A (en) * | 2016-09-30 | 2017-03-15 | 东软集团股份有限公司 | The list authority control method rendered for control and device |
CN107341388A (en) * | 2017-06-19 | 2017-11-10 | 东软集团股份有限公司 | Access right control method and device |
CN110610072A (en) * | 2019-09-06 | 2019-12-24 | 武汉达梦数据库有限公司 | Data authentication method and device |
CN110610072B (en) * | 2019-09-06 | 2021-10-01 | 武汉达梦数据库有限公司 | Data authentication method and device |
CN114967992A (en) * | 2021-02-26 | 2022-08-30 | 北京字跳网络技术有限公司 | Information interaction method, label viewing method and device |
CN114969689A (en) * | 2021-02-26 | 2022-08-30 | 北京字跳网络技术有限公司 | Information processing method and device |
CN114969688A (en) * | 2021-02-26 | 2022-08-30 | 北京字跳网络技术有限公司 | Information processing method and device |
WO2022179598A1 (en) * | 2021-02-26 | 2022-09-01 | 北京字跳网络技术有限公司 | Information processing, information interaction, tag viewing and information display method and apparatus |
CN114969688B (en) * | 2021-02-26 | 2024-07-23 | 北京字跳网络技术有限公司 | Information processing method and device |
CN115134104A (en) * | 2021-03-25 | 2022-09-30 | 北京字跳网络技术有限公司 | Information processing method, information display method and device |
CN115134104B (en) * | 2021-03-25 | 2023-09-29 | 北京字跳网络技术有限公司 | Information processing method, information display method and information display device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104317933A (en) | Authority control tag display method and system | |
CN102622444B (en) | XML (extensible markup language) message processing method and XML message processing device | |
US20080307058A1 (en) | Message handling for user interfaces | |
CN111767729B (en) | Text classification method, device, equipment and storage medium | |
CN103200292A (en) | Menu display method and terminal | |
CN104769572A (en) | Updating a front end client | |
CN103176892A (en) | Page monitoring method and system | |
CN105207886A (en) | Instant messaging (IM) message sending and display methods, IM message sending and display devices, and IM message system | |
CN105359155A (en) | Disrupting password attack using compression | |
CN105791094A (en) | User state setting method, device and system | |
US10365896B2 (en) | Storing data models together | |
CN106714123A (en) | Message transmission method and communication device | |
CN104679489A (en) | System and method for internally setting web browser in online game client side | |
CN102090039B (en) | A method of performing data mediation, and an associated computer program product, data mediation device and information system | |
CN106971163A (en) | One kind connects neck people recognition methods, device and system | |
CN107659491A (en) | A kind of Group file sharing method and system based on instant messaging | |
US11977850B2 (en) | Method for dialogue processing, electronic device and storage medium | |
CN101819524A (en) | Access method of RFID (Radio Frequency Identification Device) reader and interface driving device thereof | |
CN114265638B (en) | Communication method, device, equipment and storage medium based on plug-in compatibility | |
CN103425473A (en) | Implementation method and system of open micro-blog | |
CN102387139B (en) | Authority control method, system and device separated from application services | |
CN103500101B (en) | A kind of screen locking method, device and terminal | |
CN113779616A (en) | Method and apparatus for identifying data | |
CN102929657A (en) | Internal memory data sharing method, device and system | |
CN104571895A (en) | Method and device for adjusting information in information application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150128 |
|
RJ01 | Rejection of invention patent application after publication |