Page loading method, device, electronic device and storage medium
By obtaining user permissions and page information, the page is only loaded when permissions are granted, which solves the problem of poor control when users access the page through the URL, and improves the rigor of permission control.
Patent Information
- Application Number
- CN202111507716.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-12-10
AI Technical Summary
In the existing technology, even if a user does not have permission to access a certain page, if he obtains the URL of the page through other means, he can directly access the page, resulting in poor control effect.
By obtaining the user's permission information and target page information, the target page is only loaded when the user has access permissions, otherwise the prompt information is loaded to ensure that the user cannot access pages without permissions.
The control effect of user permissions is improved. Even if the user obtains the URL of the page, he cannot load the page without access permissions, which enhances the rigor of permission management.
Smart Images

Figure CN114238801B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of network communications, and in particular to a page loading system, method, device, electronic device and storage medium. Background Art
[0002] Permission control is often based on security considerations. For example, users with different rights can understand different content, which can ensure data security and prevent leakage; users with different responsibilities need to operate different pages, which can ensure operational efficiency and avoid page interference; users with different technical levels can operate different functions, which can ensure system security and avoid operational risks.
[0003] In the prior art, a local configuration file is compared with a tree returned by the backend. If a user does not have permission to access a certain page, the page is hidden in the navigation area. In this way, the user cannot obtain the URL (Uniform Resource Locator) of the page from the navigation area and cannot access the page.
[0004] However, in the above method, even if the user does not have permission to access a certain page, if the URL of the page is obtained from other means, the page can still be accessed directly through the URL, and the control effect is poor. Summary of the invention
[0005] The present disclosure provides a page loading method, device, electronic device and storage medium to at least solve the problem in the related art that a user can directly access the page through a URL, but the control effect is poor. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a page loading method is provided, including:
[0007] Acquire first permission information of a user, where the first permission information includes page information of pages to which the user has access permissions;
[0008] After detecting a user's access request to a target page, obtaining target page information of the target page;
[0009] In a case where the first authority information includes the target page information, the target page is loaded.
[0010] Optionally, the method further includes:
[0011] In a case where the first permission information does not include the target page information, first prompt information is loaded, where the first prompt information is used to indicate that the user does not have access rights to the target page.
[0012] Optionally, the page information includes a preset first field, and when the first permission information includes the target page information, loading the target page includes:
[0013] In a case where the first permission information includes a preset first field of the target page, the target page is loaded.
[0014] Optionally, the method further includes:
[0015] When the first permission information does not include the preset first field of the target page, first prompt information is loaded.
[0016] Optionally, the first permission information further includes a preset second field of a page to which the user does not have access permission. After obtaining the first permission information of the user, the method further includes:
[0017] Get page information for each page;
[0018] In a case where the first permission information includes a preset first field of any page, displaying page information of the any page in the navigation area;
[0019] In the case that the preset first field of any page is not included in the first permission information, if the preset second preset field of any page is a preset field, the page information of any page is displayed in the navigation area; if the preset second preset field of any page is not a preset field, the page information of any page is hidden in the navigation area.
[0020] Optionally, the method further includes:
[0021] Acquire second permission information of the user, where the second permission information includes page information of pages that the user has permission to display;
[0022] When the second permission information includes page information of any page, the page information of any page is displayed in the navigation area; when the second permission information does not include page information of any page, the page information of any page is hidden in the navigation area.
[0023] Optionally, the first permission information further includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and loading the target page includes:
[0024] Obtaining element information of the target page element;
[0025] Display the target page, and render the target page element when the first permission information includes element information of the target page element; and hide the target page element when the first permission information does not include element information of the target page element, so as to load the target page.
[0026] Optionally, the first permission information further includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and after loading the target page, the method further includes:
[0027] In response to the user's operation instruction on any target page element, acquiring element information of any target page element;
[0028] When the first permission information includes element information of the target page element, the operation instruction is executed; when the first permission information does not include element information of the target page element, second prompt information is loaded, and the second prompt information is used to indicate that the user does not have the operation authority for the target page element.
[0029] According to a second aspect of an embodiment of the present disclosure, a page loading device is provided, including:
[0030] An acquiring unit is configured to acquire first permission information of a user, wherein the first permission information includes page information of pages to which the user has access permissions;
[0031] A detection unit, configured to acquire target page information of the target page after detecting a user's access request to the target page;
[0032] The loading unit is configured to load the target page when the first permission information includes the target page information.
[0033] Optionally, the loading unit is further configured to execute:
[0034] In a case where the first permission information does not include the target page information, first prompt information is loaded, where the first prompt information is used to indicate that the user does not have access rights to the target page.
[0035] Optionally, the page information includes a preset first field, and the loading unit is configured to execute:
[0036] In a case where the first permission information includes a preset first field of the target page, the target page is loaded.
[0037] Optionally, the loading unit is configured to execute:
[0038] When the first permission information does not include the preset first field of the target page, first prompt information is loaded.
[0039] Optionally, the first permission information further includes a preset second field of a page for which the user does not have access permission, and the device further includes a first navigation unit configured to execute:
[0040] Get page information for each page;
[0041] In a case where the first permission information includes a preset first field of any page, displaying page information of the any page in the navigation area;
[0042] In the case that the preset first field of any page is not included in the first permission information, if the preset second preset field of any page is a preset field, the page information of any page is displayed in the navigation area; if the preset second preset field of any page is not a preset field, the page information of any page is hidden in the navigation area.
[0043] Optionally, the device further includes a second navigation unit configured to execute:
[0044] Acquire second permission information of the user, where the second permission information includes page information of pages that the user has permission to display;
[0045] When the second permission information includes page information of any page, the page information of any page is displayed in the navigation area; when the second permission information does not include page information of any page, the page information of any page is hidden in the navigation area.
[0046] Optionally, the first permission information further includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and the loading unit is configured to execute:
[0047] Obtaining element information of the target page element;
[0048] Display the target page, and render the target page element when the first permission information includes element information of the target page element; and hide the target page element when the first permission information does not include element information of the target page element, so as to load the target page.
[0049] Optionally, the first permission information further includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and the device further includes an operation unit configured to execute:
[0050] In response to the user's operation instruction on any target page element, acquiring element information of any target page element;
[0051] When the first permission information includes element information of the target page element, the operation instruction is executed; when the first permission information does not include element information of the target page element, second prompt information is loaded, and the second prompt information is used to indicate that the user does not have the operation authority for the target page element.
[0052] According to a third aspect of an embodiment of the present disclosure, a page loading electronic device is provided, including:
[0053] processor;
[0054] a memory for storing instructions executable by the processor;
[0055] Wherein, the processor is configured to execute the instructions to implement the page loading method described in the first item above.
[0056] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a page loading electronic device, the page loading electronic device is enabled to execute the page loading method described in the first item above.
[0057] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program / instruction, which implements the page loading method described in the first item above when executed by a processor.
[0058] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0059] Obtain the user's first permission information, which includes page information of pages to which the user has access rights; after detecting the user's access request to the target page, obtain the target page information of the target page; if the target page information is included in the first permission information, load the target page.
[0060] In this way, when the user visits the target page, the user's access rights are judged based on the first permission information and the target page information of the target page. The target page will only be loaded if the user has access rights to the target page. Therefore, even if the user obtains the URL of the page, the page that the user does not have access rights cannot be loaded, thereby improving the control effect of user permissions.
[0061] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0063] Figure 1 The figure is a flow chart of a page loading method according to an exemplary embodiment.
[0064] Figure 2 The figure is a flow chart of a page loading method according to an exemplary embodiment.
[0065] Figure 3 The figure is a block diagram of a page loading device according to an exemplary embodiment.
[0066] Figure 4 It is a block diagram of an electronic device for page loading according to an exemplary embodiment.
[0067] Figure 5 The invention is a block diagram showing a device for page loading according to an exemplary embodiment. DETAILED DESCRIPTION
[0068] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0069] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0070] According to a first aspect of an embodiment of the present disclosure, a page loading method is provided. Figure 1 is a flow chart of a page loading method according to an exemplary embodiment. Figure 1 As shown, the page loading method includes the following steps:
[0071] In step S11, first permission information of the user is obtained, where the first permission information includes page information of pages to which the user has access rights.
[0072] In the present disclosure, the first permission information of each user is different, including page information of multiple pages to which the user has access rights, that is, each user has different access rights, and different users can access different pages. The page information may include the name or logo of each page, and may also include URL address information or routing information of each page, etc., without specific limitation.
[0073] The first permission information can be edited and modified, which is convenient for maintaining the permissions of different users at different times and improving the flexibility of user permissions. In one implementation, the first permission information of the user can be in the form of a list, and each user corresponds to a different permission list.
[0074] In this step, the user's first permission information can be obtained after the user logs into the system. Specifically, after the user logs into the system, the user's identification information is first obtained, and then, based on the user's identification information, the first permission information corresponding to the user is queried. Alternatively, the first permission information can be obtained after detecting the user's access request to any page, without specific limitation.
[0075] In step S12, after detecting the user's access request to the target page, the target page information of the target page is obtained.
[0076] In this step, when the user requests to access the target page, the target page information of the target page can be obtained, and the target page information is consistent with the content included in the page information of multiple pages to which the user has access rights in the first permission information, that is, the target page information can include the name or logo of each page, and can also include the URL address information or routing information of each page, etc. Among them, the target page information of the target page can be obtained through a preset container component.
[0077] In step S13, when the first authority information includes target page information, the target page is loaded.
[0078] In this step, the target page information may be queried in the first permission information. If the target page information is included in the first permission information, it means that the user has access rights to the target page, and the target page may continue to be loaded.
[0079] In one implementation, the page information may include a preset first field, such as the curAuth field in the metadata meta of the page routing information router, and the first permission information may be a permission list including the preset first fields corresponding to each page to which the user has access rights. Then, when the preset first field of the target page is included in the first permission information, it means that the user has access rights to the target page and can continue to load the target page.
[0080] Usually, each page includes multiple page elements. In the present disclosure, the user's authority can also be configured for different page elements in the same page, so that the configuration of the user's authority is more flexible.
[0081] For example, the first permission information also includes element information of page elements to which the user has access rights, and the target page includes at least one target page element, wherein the element information of the page element may be a curAuth field corresponding to the page element.
[0082] Then, when loading a page, the page elements can be rendered or hidden according to the user's permissions on the page elements. Specifically, when loading a target page, the element information of the target page elements is first obtained, and then the target page is displayed, and when the element information of the target page elements is included in the first permission information, the target page elements are rendered, and when the element information of the target page elements is not included in the first permission information, the target page elements are hidden, so as to achieve loading of the target page.
[0083] Alternatively, when a user calls a page element, it is also possible to determine whether the function corresponding to the page element can be implemented based on the user's authority over the page element. For example, in response to a user's operation instruction on any target page element, the element information of any target page element can be obtained, and then, if the element information of the target page element is included in the first authority information, the operation instruction is executed; if the element information of the target page element is not included in the first authority information, the second prompt information is loaded, and the second prompt information is used to indicate that the user does not have the operation authority for the target page element.
[0084] In addition, when the first permission information does not include element information of page elements to which the user has access rights, the user permissions of each page element in the page can also be determined based on the v-if command statement in VUE (EventBus), without specific limitation.
[0085] In one implementation, when the target page information is not included in the first permission information, the first prompt information is loaded, and the first prompt information is used to indicate that the user does not have access rights to the target page. If the first permission information does not include the target page information, indicating that the user does not have access rights to the target page, then the first prompt information can be loaded.
[0086] In one implementation, the page information may include a preset first field, such as the curAuth field in the metadata meta of the page routing information router, and the first permission information may be a permission list of the preset first fields corresponding to each page to which the user has access rights. Then, if the preset first field of the target page is not included in the first permission information, it means that the user does not have access rights to the target page, and the first prompt information can be loaded.
[0087] In the present disclosure, after a user logs in to the system, a navigation area may be displayed for the user. The navigation area includes page information of each page in the system, such as a hyperlink to each page or a URL address of each page, etc. The user may quickly send an access request to each page through the navigation area. The navigation area may be on the left side of the page or may be a drop-down menu in the page, and the specifics are not limited thereto.
[0088] In one implementation, it may be determined whether page information of a certain page needs to be displayed in the navigation area based on the user's authority to different pages.
[0089] For example, the first permission information may include a preset second field of a page to which the user does not have access rights. After obtaining the user's first permission information, the page information of each page is obtained, and then, if the preset first field of any page is included in the first permission information, the page information of any page is displayed in the navigation area; if the preset first field of any page is not included in the first permission information, if the preset second preset field of any page is a preset field, the page information of any page is displayed in the navigation area; if the preset second preset field of any page is not a preset field, the page information of any page is hidden in the navigation area.
[0090] Among them, the preset second field can be the hide field in the metadata meta of the page routing information router, the preset value of the second field can be TRUE and FALSE, and the preset field is FLASE. That is to say, if the user has access rights to a certain page, then the page information of the page is displayed in the navigation area. If the user does not have access rights to a certain page, then the hide field in the first permission information corresponding to the user is obtained. If the hide field is FLASE, the page information of the page is displayed in the navigation area. If the hide field is TRUE, the page information of the page is hidden in the navigation area. In this way, the display or hiding of different pages in the navigation area can be configured in the first permission information, thereby improving the flexibility of user permission configuration and facilitating subsequent maintenance.
[0091] In another implementation, the user's second permission information can be obtained, and the second permission information includes page information of pages that the user has display permission to display; when the page information of any page is included in the second permission information, the page information of any page is displayed in the navigation area; when the page information of any page is not included in the second permission information, the page information of any page is hidden in the navigation area.
[0092] The second permission information and the first permission information are different information, so that the display or hiding of different pages in the navigation area is configured in other permission information, thereby reducing recursive calculations during operation and saving computing resources.
[0093] like Figure 2The figure shows a flow chart of a page loading method of the present invention, wherein, after the user logs into the system, the user id (Identity document, identification information) is first obtained, and the user's permission list is obtained through the user id, and then the side guide is loaded, that is, the navigation area on the left side of the page, and the curAuth field of the meta of the router corresponding to the side guide is obtained, and the user's permission list and curAuth field are used to determine whether the user has permission. If the user has permission, the side guide is displayed, otherwise, it is determined whether the hide field is true, if the hide field is true, the corresponding side guide is hidden, and if the hide field is false, the side guide continues to be displayed. In addition, when a user's access request to any page is detected, that is, after the user enters any page, the curAuth field of the route of the page is obtained, and the user's permission list and curAuth are used to determine whether the user has permission. If the user has permission, the page is displayed and the page elements are rendered. If the user does not have permission, the user is prompted that he does not have permission. When rendering a page element, the user's permission list and the page element's curAuth are used to determine whether the user has permission to the page element. If the user has permission, the page element is displayed; if the user does not have permission, the page element is hidden, or a prompt is given when the user uses it.
[0094] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure is that when a user visits a target page, the user's access rights are judged once based on the first permission information and the target page information of the target page. The target page will only be loaded if the user has access rights to the target page. Therefore, even if the user obtains the URL of the page, the page that does not have access rights cannot be loaded, thereby improving the control effect on user permissions.
[0095] According to a second aspect of an embodiment of the present disclosure, a page loading device is provided. Figure 3 is a block diagram of a page loading device according to an exemplary embodiment. Figure 3 As shown, the page loading device includes:
[0096] An acquisition unit 201 is configured to acquire first permission information of a user, wherein the first permission information includes page information of pages to which the user has access permissions;
[0097] The detection unit 202 is configured to acquire target page information of the target page after detecting a user's access request to the target page;
[0098] The loading unit 203 is configured to load the target page when the first permission information includes the target page information.
[0099] In one implementation, the loading unit 203 is further configured to execute:
[0100] In a case where the first permission information does not include the target page information, first prompt information is loaded, where the first prompt information is used to indicate that the user does not have access rights to the target page.
[0101] In one implementation, the page information includes a preset first field, and the loading unit 203 is configured to execute:
[0102] In a case where the first permission information includes a preset first field of the target page, the target page is loaded.
[0103] In one implementation, the loading unit 203 is configured to execute:
[0104] When the first permission information does not include the preset first field of the target page, first prompt information is loaded.
[0105] In one implementation, the first permission information further includes a preset second field of a page to which the user does not have access permission, and the device further includes a first navigation unit configured to execute:
[0106] Get page information for each page;
[0107] In a case where the first permission information includes a preset first field of any page, displaying page information of the any page in the navigation area;
[0108] In the case that the preset first field of any page is not included in the first permission information, if the preset second preset field of any page is a preset field, the page information of any page is displayed in the navigation area; if the preset second preset field of any page is not a preset field, the page information of any page is hidden in the navigation area.
[0109] In one implementation, the apparatus further includes a second navigation unit configured to execute:
[0110] Acquire second permission information of the user, where the second permission information includes page information of pages that the user has permission to display;
[0111] When the second permission information includes page information of any page, the page information of any page is displayed in the navigation area; when the second permission information does not include page information of any page, the page information of any page is hidden in the navigation area.
[0112] In one implementation, the first permission information further includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and the loading unit 203 is configured to execute:
[0113] Obtaining element information of the target page element;
[0114] Display the target page, and render the target page element when the first permission information includes element information of the target page element; and hide the target page element when the first permission information does not include element information of the target page element, so as to load the target page.
[0115] In one implementation, the first permission information further includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and the device further includes an operation unit configured to execute:
[0116] In response to the user's operation instruction on any target page element, acquiring element information of any target page element;
[0117] When the first permission information includes element information of the target page element, the operation instruction is executed; when the first permission information does not include element information of the target page element, second prompt information is loaded, and the second prompt information is used to indicate that the user does not have the operation authority for the target page element.
[0118] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure is that when a user visits a target page, the user's access rights are judged once based on the first permission information and the target page information of the target page. The target page will only be loaded if the user has access rights to the target page. Therefore, even if the user obtains the URL of the page, the page that does not have access rights cannot be loaded, thereby improving the control effect on user permissions.
[0119] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0120] Figure 4 It is a block diagram of an electronic device for page loading according to an exemplary embodiment.
[0121] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to perform the above method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0122] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed on a computer, the computer implements the above-mentioned page loading method.
[0123] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure is that when a user visits a target page, the user's access rights are judged once based on the first permission information and the target page information of the target page. The target page will only be loaded if the user has the access rights to the target page. Otherwise, the first prompt information is loaded to remind the user that he does not have the access rights to the target page. Therefore, even if the user obtains the URL of the page, the page for which he does not have the access rights cannot be loaded, thereby improving the control effect on user rights.
[0124] Figure 5 is a block diagram of a device 800 for page loading according to an exemplary embodiment.
[0125] For example, apparatus 800 may be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0126] Reference Figure 5 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0127] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0128] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0129] The power supply component 807 provides power to the various components of the device 800. The power supply component 807 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0130] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0131] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0132] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0133] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0134] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0135] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the methods described in the first and second aspects.
[0136] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above method. Optionally, for example, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0137] In an exemplary embodiment, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute the page loading method described in the above embodiment.
[0138] From the above, it can be seen that the technical solution provided by the embodiment of the present disclosure is that when a user visits a target page, the user's access rights are judged once based on the first permission information and the target page information of the target page. The target page will only be loaded if the user has access rights to the target page. Therefore, even if the user obtains the URL of the page, the page that does not have access rights cannot be loaded, thereby improving the control effect on user permissions.
[0139] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0140] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A page loading method, characterized in that: include: Acquire first permission information of a user, where the first permission information includes page information of pages to which the user has access permissions; After detecting a user's access request to a target page, obtaining target page information of the target page; In a case where the first permission information includes the target page information, loading the target page; The page information includes a preset first field, the first permission information also includes a preset second field of a page to which the user does not have access rights, and after obtaining the first permission information of the user, the method further includes: Get page information for each page; In a case where the first permission information includes a preset first field of any page, displaying page information of the any page in the navigation area; In the case that the preset first field of any page is not included in the first permission information, if the preset second preset field of any page is a preset field, the page information of any page is displayed in the navigation area; if the preset second preset field of any page is not a preset field, the page information of any page is hidden in the navigation area.
2. The page loading method according to claim 1, characterized in that: The method further comprises: In a case where the first permission information does not include the target page information, first prompt information is loaded, where the first prompt information is used to indicate that the user does not have access rights to the target page.
3. The page loading method according to claim 1, characterized in that: In the case where the first permission information includes the target page information, loading the target page includes: In a case where the first permission information includes a preset first field of the target page, the target page is loaded.
4. The page loading method according to claim 3, characterized in that: The method further comprises: When the first permission information does not include the preset first field of the target page, first prompt information is loaded.
5. The page loading method according to claim 1, characterized in that: The method further comprises: Acquire second permission information of the user, where the second permission information includes page information of pages that the user has permission to display; When the second permission information includes page information of any page, the page information of any page is displayed in the navigation area; when the second permission information does not include page information of any page, the page information of any page is hidden in the navigation area.
6. The page loading method according to claim 1, characterized in that: The first permission information also includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and loading the target page includes: Obtaining element information of the target page element; Display the target page, and render the target page element when the first permission information includes element information of the target page element; and hide the target page element when the first permission information does not include element information of the target page element, so as to load the target page.
7. The page loading method according to claim 1, characterized in that: The first permission information also includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and after loading the target page, the method further includes: In response to the user's operation instruction on any target page element, acquiring element information of any target page element; When the first permission information includes element information of the target page element, the operation instruction is executed; when the first permission information does not include element information of the target page element, second prompt information is loaded, and the second prompt information is used to indicate that the user does not have the operation authority for the target page element.
8. A page loading device, characterized in that: include: An acquiring unit is configured to acquire first permission information of a user, wherein the first permission information includes page information of pages to which the user has access permissions; A detection unit, configured to acquire target page information of the target page after detecting a user's access request to the target page; a loading unit, configured to load the target page when the first permission information includes the target page information; The page information includes a preset first field, the first permission information also includes a preset second field of a page to which the user does not have access permission, and the device also includes a first navigation unit configured to execute: Get page information for each page; In a case where the first permission information includes a preset first field of any page, displaying page information of the any page in the navigation area; In the case that the preset first field of any page is not included in the first permission information, if the preset second preset field of any page is a preset field, the page information of any page is displayed in the navigation area; if the preset second preset field of any page is not a preset field, the page information of any page is hidden in the navigation area.
9. The page loading device according to claim 8, characterized in that: The loading unit is further configured to execute: In a case where the first permission information does not include the target page information, first prompt information is loaded, where the first prompt information is used to indicate that the user does not have access rights to the target page.
10. The page loading device according to claim 8, characterized in that: The loading unit is configured to execute: In a case where the first permission information includes a preset first field of the target page, the target page is loaded.
11. The page loading device according to claim 10, characterized in that: The loading unit is configured to execute: When the first permission information does not include the preset first field of the target page, first prompt information is loaded.
12. The page loading device according to claim 8, characterized in that: The apparatus further comprises a second navigation unit configured to execute: Acquire second permission information of the user, where the second permission information includes page information of pages that the user has permission to display; In a case where the second permission information includes page information of any page, displaying the page information of any page in the navigation area; In a case where the second authority information does not include the page information of any page, the page information of any page is hidden in the navigation area.
13. The page loading device according to claim 8, characterized in that: The first permission information also includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and the loading unit is configured to execute: Obtaining element information of the target page element; Display the target page, and render the target page element when the first permission information includes element information of the target page element; and hide the target page element when the first permission information does not include element information of the target page element, so as to load the target page.
14. The page loading device according to claim 8, characterized in that: The first permission information also includes element information of page elements to which the user has access rights, the target page includes at least one target page element, and the device also includes an operation unit configured to execute: In response to the user's operation instruction on any target page element, acquiring element information of any target page element; In a case where the first permission information includes element information of the target page element, executing the operation instruction; In a case where the first permission information does not include the element information of the target page element, second prompt information is loaded, where the second prompt information is used to indicate that the user does not have the operation permission for the target page element.
15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the page loading method as described in any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a page loading electronic device, the page loading electronic device is enabled to execute the page loading method as described in any one of claims 1 to 7.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the page loading method according to any one of claims 1 to 7 is implemented.
