Project-based role permission control method and system
By dynamically managing the user's role permissions in different projects, the problem that traditional project management systems cannot adapt to the needs of changeable roles is solved, and flexibility and security is improved, the permission configuration process is simplified, and the system data is ensured. sex.
Patent Information
- Application Number
- CN202411197470.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional project management systems cannot flexibly adapt to the needs of users' changes in roles and responsibilities in different projects, resulting in inadequate permission management.
Through a method and system that controls role permissions based on project, dynamically detects and manages projects that users participate in, assigns corresponding permissions according to the roles of users in different projects, and synchronizes permission changes in real time, including user information management, project and role association, Login verification and project selection, dynamic permission adjustment and access control modules.
Improves flexibility and security of project management, simplifies user login process, ensures the security and integrity of system data, and supports the expansion of custom roles and permissions.
Smart Images

Figure CN119227032A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer software, and in particular to a method and system based on project control role authority. Background Art
[0002] Currently, in traditional project management systems, user permissions are often statically configured, that is, user permissions do not change between projects. However, in actual work scenarios, project personnel often need to participate in multiple projects at the same time, and the roles and responsibilities they assume in each project are different. Traditional permission management systems cannot flexibly adapt to such changing needs. Therefore, a method is needed to dynamically adjust the role permissions of users based on the projects they are currently participating in. Summary of the invention
[0003] The technical task of the present invention is to address the above deficiencies and provide a method and system based on project control role permissions, which can dynamically allocate and manage corresponding role permissions according to the different projects in which project personnel participate, thereby improving the flexibility and security of project management.
[0004] The technical solution adopted by the present invention to solve its technical problem is:
[0005] A method for controlling role permissions based on a project, the implementation of the method comprising the following steps:
[0006] When a user logs in, a list of all projects that the current user is involved in is automatically detected and displayed;
[0007] If the user participates in multiple projects, the user is required to select a project from the project list to enter the system;
[0008] If the user only participates in one project, the project will be automatically set as the user's current default project and the user will enter the system directly;
[0009] Based on the project selected by the user or the default project, dynamically load and apply the corresponding role permission control rules under the project to limit the user's access and operations on system resources.
[0010] This method can dynamically assign corresponding permissions according to the roles that users play in different projects, while ensuring permission verification and access control, as well as real-time synchronization of permission changes. For example: when a user logs in, the projects that the current user is involved in will be displayed. When a user participates in multiple projects, he needs to select a project before entering the system; when a user only participates in one project, the current project will be automatically defaulted to enter the system.
[0011] Furthermore, the display of the project list includes the name of the project, the role information of the user in the project, and the project status.
[0012] Furthermore, after the user selects a project, the user's role authority in the project is automatically verified, and the display of the user interface and functional modules is adjusted according to the verification result.
[0013] Furthermore, the role authority control rules include: definition of user roles under different projects, operation authorities corresponding to the roles, and data access authorities.
[0014] Furthermore, the operation permissions specifically include: creation, modification, deletion, and query operations on system resources;
[0015] The data access rights specifically include: read, write, and update permissions for a specific data set.
[0016] Furthermore, when a user logs out of the system, the user's last active project and role status are automatically recorded for quick restoration the next time they log in.
[0017] Furthermore, the specific implementation of this method is as follows:
[0018] 1) User information management:
[0019] Establish a user information management system to store basic user information, a list of projects in which the user is involved, and role information in each project;
[0020] 2) Project and role association:
[0021] Define a role system for each project and associate users with specific roles in each project. Users can have different roles in different projects.
[0022] 3) Login verification and project selection:
[0023] When a user logs in to the system, identity authentication is performed, token information is generated, and the token information is returned to the front-end page;
[0024] After identity verification is passed, check the number of projects the user is involved in:
[0025] a. If the user is only involved in one project, the project will be automatically selected as the user's current project, and permissions will be assigned based on the role in the project;
[0026] b. If the user participates in multiple projects, the project selection interface is displayed, requiring the user to select a project as the current project, and then permissions are assigned based on the role in the selected project;
[0027] 4) Dynamic adjustment of permissions:
[0028] When the user switches between different projects, permissions are reallocated based on the currently selected project;
[0029] Supports real-time monitoring of user role changes and project status changes, and dynamically adjusts functional permissions accordingly;
[0030] 5) Access Control:
[0031] All user operations are subject to permission verification to ensure that users can only access and operate authorized resources;
[0032] Permission verification is performed based on the current user's project selection and the role configuration in the project.
[0033] The present invention also claims a system based on project control role authority, comprising:
[0034] User information management module, used to store the user's basic information, list of participating projects, and role information in each project;
[0035] Project and role association module, used to associate users with specific roles in each project;
[0036] The login verification and project selection module is used to implement identity authentication when the user logs into the system. After the identity authentication is passed, the number of projects in which the user participates is checked;
[0037] The permission dynamic adjustment module is used to redistribute permissions according to the currently selected project when the user switches between different projects;
[0038] Access control module, used to implement permission verification based on the current user's project selection and role configuration in the project;
[0039] The system specifically implements role authority control of project personnel through the above-mentioned method based on project control role authority.
[0040] The present invention also claims protection for an implementation device based on project control role authority, characterized in that it includes: at least one memory and at least one processor;
[0041] The at least one memory is used to store a machine-readable program;
[0042] The at least one processor is used to call the machine-readable program to implement the above method.
[0043] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which implement the above method when executed by a processor.
[0044] Compared with the prior art, the method and system based on project control role authority of the present invention have the following beneficial effects:
[0045] 1. High flexibility: Ability to dynamically adjust role permissions based on different projects in which users participate, meeting complex permission management requirements in a multi-project environment.
[0046] 2. Easy operation: After logging in, users can enter the system according to project selection without the need for tedious permission configuration process.
[0047] 3. Strong security: Ensure the security and integrity of system data through strict permission verification and access control.
[0048] 4. Easy to expand: The system supports custom roles and permissions, and is easy to adapt to changing needs of different projects and business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a diagram of a user login process of a method based on project control role authority provided by an embodiment of the present invention;
[0050] Figure 2 is a flowchart of project selection and authority allocation provided by an embodiment of the present invention;
[0051] Figure 3 is a diagram of a project and role association page provided by an embodiment of the present invention;
[0052] Figure 4 This is a code example for verifying the user's login information through token information when the user logs into the system according to an embodiment of the present invention;
[0053] Figure 5 This is an example of a code for implementing verification when a user logs into a system provided by an embodiment of the present invention;
[0054] Figure 6 This is an example diagram of a page for selecting an item when a user logs into a system provided by an embodiment of the present invention;
[0055] Figure 7 This is an implementation code example for selecting a project when a user logs into a system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described below in conjunction with specific embodiments.
[0057] The embodiment of the present invention provides a method for controlling role permissions based on a project, such as Figure 1 As shown, the implementation of this method includes the following steps:
[0058] When a user logs in, a list of all projects that the current user is involved in is automatically detected and displayed;
[0059] If the user participates in multiple projects, the user is required to select a project from the project list to enter the system;
[0060] If the user only participates in one project, the project will be automatically set as the user's current default project and the user will enter the system directly;
[0061] Based on the project selected by the user or the default project, dynamically load and apply the corresponding role permission control rules under the project to limit the user's access and operations on system resources.
[0062] The display of the project list includes the name of the project, the role information of the user in the project and the project status.
[0063] After the user selects a project, the user's role permissions in the project are automatically verified, and the display of the user interface and functional modules are adjusted based on the verification results.
[0064] The role authority control rules include: the definition of user roles under different projects, the operation authority corresponding to the roles, and the data access authority.
[0065] The operation permissions specifically include: creation, modification, deletion, and query operations on system resources;
[0066] The data access rights specifically include: read, write, and update permissions for a specific data set.
[0067] When a user logs out of the system, the system automatically records the user's last active project and role status for quick restoration the next time the user logs in.
[0068] This method is applicable to project management systems in multi-project environments.
[0069] Taking Java language implementation as an example, the specific implementation of this method is as follows:
[0070] 1. User information management:
[0071] Establish a user information management system to store users' basic information, lists of projects they participate in, and role information in each project.
[0072] 2. Project and role association:
[0073] Define a role system for each project and associate users with specific roles in each project. Users can have different roles in different projects. Figure 3 shown.
[0074] 3. Login verification and project selection:
[0075] When a user logs in to the system, identity authentication is performed, token information is generated, and the token information is returned to the front-end page; the code example is as follows Figure 4 , Figure 5 As shown;
[0076] After identity verification is passed, check the number of projects the user is involved in:
[0077] a. If the user is only involved in one project, the project will be automatically selected as the user's current project, and permissions will be assigned based on the role in the project;
[0078] b. If the user participates in multiple projects, the project selection interface is displayed, requiring the user to select a project as the current project, and then permissions are assigned based on the role in the selected project;
[0079] An example of a page like Figure 6 As shown, the implementation code example is as follows Figure 7 shown.
[0080] 4. Dynamic adjustment of permissions:
[0081] When the user switches between different projects, permissions are reallocated based on the currently selected project;
[0082] Supports real-time monitoring of user role changes and project status changes, and dynamically adjusts functional permissions accordingly;
[0083] The permission adjustment process is as follows Figure 2 shown.
[0084] 5. Access Control:
[0085] All user operations are subject to permission verification to ensure that users can only access and operate authorized resources;
[0086] Permission verification is performed based on the current user's project selection and the role configuration in the project.
[0087] The embodiment of the present invention further provides a system based on project control role authority, including:
[0088] The user information management module is used to establish a user information management system to store the user's basic information, a list of projects in which they participate, and information about their roles in each project.
[0089] The project and role association module is used to define a role system for each project and associate users with specific roles in each project. Users can have different roles in different projects.
[0090] The login verification and project selection module is used to implement identity authentication when the user logs into the system. After the identity authentication is passed, the number of projects in which the user participates is checked:
[0091] (1) When a user logs in to the system, the system performs identity authentication, generates token information, and returns the token information to the front-end page;
[0092] (2) After identity verification, the system checks the number of projects the user has participated in:
[0093] If the user participates in only one project, that project is automatically selected as the user's current project, and permissions are assigned based on the role in that project.
[0094] If the user participates in multiple projects, the project selection interface is displayed, requiring the user to select a project as the current project, and then permissions are assigned based on the role in the selected project.
[0095] The dynamic permission adjustment module is used to enable the system to reallocate permissions based on the currently selected project when the user switches between different projects. The system supports real-time monitoring of user role changes and project status changes, and dynamically adjusts functional permissions accordingly.
[0096] The access control module is used to implement permission verification based on the current user's project selection and role configuration in the project:
[0097] (1) All operations performed by users in the system must be subject to permission verification to ensure that users can only access and operate authorized resources;
[0098] (2) Permission verification is performed based on the current user's project selection and the role configuration in the project.
[0099] The system specifically implements the role authority control of project personnel through the method based on project control role authority described in the above embodiment:
[0100] When a user logs in, the system automatically detects and displays a list of all projects that the current user is involved in;
[0101] If the user participates in multiple projects, the user is required to select a project from the project list to enter the system;
[0102] If the user only participates in one project, the system automatically sets that project as the user's current default project and enters the system directly;
[0103] Based on the project selected by the user or the default project, the system dynamically loads and applies the corresponding role permission control rules under the project to limit the user's access to and operations on system resources.
[0104] The display of the project list includes the name of the project, the role information of the user in the project and the project status.
[0105] After the user selects a project, the system automatically verifies the user's role permissions in the project and adjusts the display of the user interface and functional modules based on the verification results.
[0106] The role authority control rules include: the definition of user roles under different projects, the operation authority corresponding to the roles, and the data access authority.
[0107] The operation permissions specifically include: operations such as creation, modification, deletion, and query of system resources; the data access permissions specifically include: permissions such as reading, writing, and updating of specific data sets.
[0108] When a user logs out of the system, the user's last active project and role status are automatically recorded so that they can be quickly restored the next time they log in.
[0109] This system is a project management system in a multi-project environment.
[0110] The embodiment of the present invention further provides an implementation device based on project control role authority, characterized in that it includes: at least one memory and at least one processor;
[0111] The at least one memory is used to store a machine-readable program;
[0112] The at least one processor is used to call the machine-readable program to implement the method for controlling role permissions based on projects described in the above embodiment.
[0113] The embodiment of the present invention further provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the method based on project control role authority described in the above embodiment is implemented. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0114] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0115] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0116] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0117] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0118] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A method for project-based control role permissions, characterized in that: The implementation of this method includes the following steps: When a user logs in, a list of all projects that the current user is involved in is automatically detected and displayed; If the user participates in multiple projects, the user is required to select a project from the project list to enter the system; If the user only participates in one project, the project will be automatically set as the user's current default project and the user will enter the system directly; Based on the project selected by the user or the default project, dynamically load and apply the corresponding role permission control rules under the project to limit the user's access and operations on system resources.
2. A method based on project control role authority according to claim 1, characterized in that: The display of the project list includes the name of the project, the role information of the user in the project and the project status.
3. A method based on project control role authority according to claim 1 or 2, characterized in that: After the user selects a project, the user's role permissions in the project are automatically verified, and the display of the user interface and functional modules are adjusted based on the verification results.
4. A method based on project control role authority according to claim 1, characterized in that: The role authority control rules include: the definition of user roles under different projects, the operation authority corresponding to the roles, and the data access authority.
5. A method based on project control role authority according to claim 4, characterized in that: The operation permissions specifically include: creation, modification, deletion, and query operations on system resources; The data access rights specifically include: read, write, and update permissions for a specific data set.
6. A method based on project control role authority according to claim 1, characterized in that: When a user logs out of the system, the system automatically records the user's last active project and role status for quick restoration the next time the user logs in.
7. A method based on project control role authority according to claim 1, characterized in that: The specific implementation of this method is as follows: 1) User information management: Establish a user information management system to store basic user information, a list of projects in which the user is involved, and role information in each project; 2) Project and role association: Define a role system for each project and associate users with specific roles in each project. Users can have different roles in different projects. 3) Login verification and project selection: When a user logs in to the system, identity authentication is performed, token information is generated, and the token information is returned to the front-end page; After identity verification is passed, check the number of projects the user is involved in: a. If the user is only involved in one project, the project will be automatically selected as the user's current project, and permissions will be assigned based on the role in the project; b. If the user participates in multiple projects, the project selection interface is displayed, requiring the user to select a project as the current project, and then permissions are assigned based on the role in the selected project; 4) Dynamic adjustment of permissions: When the user switches between different projects, permissions are reallocated based on the currently selected project; Supports real-time monitoring of user role changes and project status changes, and dynamically adjusts functional permissions accordingly; 5) Access Control: All user operations are subject to permission verification to ensure that users can only access and operate authorized resources; Permission verification is performed based on the current user's project selection and the role configuration in the project.
8. A system based on project control role permissions, characterized in that: include: User information management module, used to store the user's basic information, list of participating projects, and role information in each project; Project and role association module, used to associate users with specific roles in each project; The login verification and project selection module is used to implement identity authentication when the user logs into the system. After the identity authentication is passed, the number of projects in which the user participates is checked; The permission dynamic adjustment module is used to redistribute permissions according to the currently selected project when the user switches between different projects; Access control module, used to implement permission verification based on the current user's project selection and role configuration in the project; The system specifically implements role authority control of project personnel through the method based on project control role authority as described in any one of claims 1 to 7.
9. A device for implementing project control role authority, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to implement the method according to any one of claims 1 to 7.
10. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 7.
