Code authority management method and device, equipment and storage medium

By building a permission management template, the permissions of the code warehouse are managed based on the code project information and permission configuration rules, the problems of cumbersome and chaotic permission configuration of the code warehouse are solved, and unified management and simplified configuration of the code warehouse permissions are realized.

CN119808107APending Publication Date: 2025-04-11ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311309668.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, the permission configuration of the code repository is cumbersome and prone to chaos, making it difficult to effectively manage the code permissions of the code repository.

Method used

By obtaining the code project information of the target code and the permission configuration rules of the code repository, a permission management template is built, and the code permissions of the target code in the code repository are managed based on the template.

Benefits of technology

It realizes unified management of code permissions in multiple different code repositories, simplifies the permission configuration process, and avoids the confusion of permission management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808107A_ABST
    Figure CN119808107A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a code authority management method and device, equipment and a storage medium, and the method comprises the steps: obtaining code item information of a target code; obtaining a permission configuration rule of a code warehouse corresponding to the target code; constructing an authority management template of the code warehouse according to the code item information and the authority configuration rule; and managing the code authority of the target code in the code warehouse based on the authority management template. According to the method, the permission management templates corresponding to the permission configuration rules of the code warehouse are constructed, one permission configuration rule corresponds to one permission management template, and the code permission of the target code in the code warehouse is managed based on the permission management templates; according to the method and the device, code permissions of multiple different code warehouses are managed in a unified manner through multiple permission management templates, and the technical problems that code permission configuration in related technologies is relatively tedious and is easy to be disordered, and management of the code permissions of the code warehouses is not facilitated are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a code permission management method, device, equipment and storage medium. Background Art

[0002] Code repositories are used to store software system codes. Generally speaking, a code repository can store codes for multiple software systems or just one software system. With the continuous expansion of software scale, the complexity of software business and the increase in the number of personnel, effective management of code permissions in code repositories has become the key to ensuring information security and efficiency of software development.

[0003] Generally speaking, when the codes of multiple software systems are stored in different code repositories, the configuration of code permissions is cumbersome and prone to confusion due to the different management rules of different code repositories, which is not conducive to the management of code permissions in the code repositories. Summary of the invention

[0004] The main purpose of this application is to provide a code permission management method, device, equipment and storage medium, which are used to solve the technical problem that the configuration of related technical code permissions is cumbersome and prone to confusion, which is not conducive to the management of code permissions of code repositories.

[0005] In a first aspect, the present application provides a code permission management method, comprising:

[0006] Get the code project information of the target code;

[0007] Obtaining permission configuration rules for the code repository corresponding to the target code;

[0008] Constructing a rights management template for the code repository according to the code project information and the rights configuration rules;

[0009] The code permissions of the target code in the code repository are managed based on the permission management template.

[0010] In a second aspect, the present application also provides a code authority management device, including:

[0011] A first acquisition module is used to acquire code project information of the target code;

[0012] A second acquisition module acquires the permission configuration rules of the code repository corresponding to the target code;

[0013] A construction module, used to construct a rights management template for the code repository according to the code project information and the rights configuration rules;

[0014] A management module is used to manage the code permissions of the target code in the code repository based on the permission management template.

[0015] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor;

[0016] Memory for storing computer programs;

[0017] The processor is used to execute a computer program and implement the above-mentioned code permission management method when executing the computer program.

[0018] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the code permission management method as described above are implemented.

[0019] The present application provides a code permission management method, apparatus, device and storage medium, wherein the method includes: obtaining code project information of a target code; obtaining permission configuration rules of a code repository corresponding to the target code; constructing a permission management template of the code repository according to the code project information and the permission configuration rules; and managing the code permissions of the target code in the code repository based on the permission management template. The present application constructs a permission management template corresponding to the permission configuration rules of the code repository through the code project information of the target code and the permission configuration rules of the code repository, and one permission configuration rule corresponds to one permission management template, so as to manage the code permissions of the target code in the corresponding code repository based on the permission management template, thereby realizing unified management of the code permissions of multiple different code repositories through multiple permission management templates, solving the technical problem that the configuration of code permissions in related technologies is cumbersome and prone to confusion, which is not conducive to the management of code permissions of code repositories. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 It is a flowchart of a code permission management method provided by an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of the connection between the server and the terminal provided in the embodiment of the present application;

[0023] Figure 3This is a schematic diagram of a scenario for managing multiple code repositories provided in an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of a rights management template provided in an embodiment of the present application;

[0025] Figure 5 is a schematic block diagram of a code authority management device provided in an embodiment of the present application;

[0026] Figure 6 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0029] The embodiments of the present application provide a code permission management method, apparatus, device and storage medium. Among them, the intent recognition method can be applied to electronic devices, which can be mobile phones, tablet computers, laptops, desktop computers and other devices. It can also be applied to a server, which can be a separate server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0030] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0031] See also Figure 1 , Figure 1 It is a flowchart of a code authority management method provided by an embodiment of the present application. It should be noted that the code authority management method provided by the embodiment of the present application can be used in electronic devices, and of course can also be used in servers.

[0032] like Figure 2As shown, the code authority management method is applied to a server, the server and the terminal are connected in communication, and the management data obtained by the code authority management method can be sent to the terminal through the server. Of course, it is not limited to this and is not limited here.

[0033] In specific implementation, the terminal includes but is not limited to: any one of a mobile phone, a tablet computer, a laptop computer, and a desktop computer; the server can be a single server or a server cluster, or a cloud server that provides cloud computing services.

[0034] like Figure 1 As shown, the code authority management method includes steps S101 to S104.

[0035] Step S101: Obtain code project information of the target code.

[0036] Code project information may include a newly developed software system, or may include software systems of different versions updated based on the original software system. It should be noted that in the field of software development, each software system may include multiple functional requirement information, which is generally obtained by collecting functions that users want to achieve. For example, in an actual application scenario, a user wants to achieve functions such as multi-person synchronous video, multi-person synchronous location sharing, and voice translation in different languages ​​for a chat software system to be developed. Therefore, the functions of achieving multi-person synchronous video, multi-person synchronous location sharing, and voice translation in different languages ​​can be defined as functional requirement information. In other words, the chat software system to be developed is one of the many code project information of a software company, and the chat software system, i.e., the code project information, may include multiple functional requirement information. The target code refers to the source code of the code project information, such as the source code of a newly developed software system or the source code of a software system of different versions updated based on the original software system. In actual applications, before starting to develop a software system, it is usually necessary to determine the functional requirement information required by the software system. For example, a chat software system is developed, and the source code of the chat software system is the target code, and the chat software system at least includes functional requirement information such as video function, voice function, group chat function, and translation function.

[0037] It is understandable that the code project information includes different functional requirement information, and the different functional requirement information is generally implemented by users developing different codes according to their respective permissions.

[0038] Step S102: Obtain the permission configuration rules of the code repository corresponding to the target code.

[0039] It should be noted that in software system development, the code repository is a very important tool, which is used to store and manage the source code of the software system. The code repository can usually include one or more version control systems, which can record the change history of each code version and the submission record of the developer. In team collaborative development, the code repository also plays a very important role, which can conveniently manage the code collaboration and version control between developers. In software system development, the more common code repositories include GitHub, Gerrit, GitLab, etc. Specifically, GitHub is a hosting platform for open source and private software projects, which only supports Git as the only version library format for hosting. Gerrit is a free, open source code review software that uses a web interface. It uses a web browser to facilitate software programmers in the same team to review each other's modified program code and decide whether to submit, return or continue to modify it. GitLab is an open source project for warehouse management systems, which uses Git as a code management tool and a web service built on this basis.

[0040] like Figure 3 As shown, in this embodiment, the code warehouse is used as a code hosting platform. In order to manage the code warehouse in a unified manner, a code permission management platform is established, and the code hosting platform is managed through the code permission management platform. Specifically, the code permission management platform can access each code warehouse through LDAP (Lightweight Directory Access Protocol) to unify the accounts of users using different code warehouses. Not only can it ensure that each code warehouse uses the same format of user accounts, but it can also solve the problem of inconsistent accounts and cumbersome permission management due to users using local accounts created by each code warehouse itself.

[0041] It is understandable that different code repositories generally correspond to different permission configuration rules. Of course, different code repositories can also correspond to the same permission configuration rules. It should be noted that the permission configuration rules mean that each code repository has its own configuration format when configuring code permissions. For example, Gerrit and Gitlab generally manage code and documents in two dimensions: group and project. For the Gerrit code repository, its corresponding permission configuration rules consist of two files: group and project configuration (groups and project.config). Therefore, before building the permission management template, you need to obtain the permission configuration rules of the code repository corresponding to the target code.

[0042] Step S103: construct a rights management template for the code repository according to the code project information and the rights configuration rules.

[0043] After determining the various functional requirement information of the software system to be developed and the permission configuration rules of the code repository, configure permissions for each functional requirement information based on the corresponding permission configuration rules to build a permission management template corresponding to the code repository. Suppose a chat software system includes functional requirement information such as video function, voice function, group chat function, translation function, etc. The code corresponding to each functional requirement information is configured with corresponding permissions, such as the permission to write code, the permission to submit code, and the permission to modify code for the voice function. Then, based on the permission configuration rules of the code repository corresponding to the chat software system, construct the permissions corresponding to each functional requirement information, and obtain the permission management template of the code repository corresponding to the chat software system.

[0044] Step S104: managing the code permissions of the target code in the code repository based on the permission management template.

[0045] After building the permission management template, you need to import the permission management template into the corresponding code repository so that you can manage the code permissions of the target code in the code repository based on the permission management template. Figure 3 As shown, after the code permission management platform builds the permission management template, the permission management template can be imported into the corresponding code repository, that is, the code hosting platform, so that the code permission management platform can manage the code permissions of the target code in the code repository based on the permission management template. Specifically, users can apply for permissions from the code permission management platform, and after the code permission management platform passes the review, they can exercise the corresponding permissions in the corresponding code repository. In addition, users can also query their permissions on the code permission management platform. Taking the Gerrit code repository as an example, after building a permission management template corresponding to the permission configuration rules of the Gerrit code repository, the permission management template needs to be imported into the Gerrit code repository. When managing code permissions based on the permission management template, the functional requirement information, roles, code permissions and other data in the code repository will also be updated synchronously to facilitate unified management of code permissions for different code repositories.

[0046] The code permission management method provided in the above embodiment includes: obtaining code project information of the target code; obtaining permission configuration rules of the code repository corresponding to the target code; constructing a permission management template of the code repository according to the code project information and the permission configuration rules; and managing the code permissions of the target code in the code repository based on the permission management template. The present application constructs a permission management template corresponding to the permission configuration rules of the code repository through the code project information of the target code and the permission configuration rules of the code repository, and one permission configuration rule corresponds to one permission management template, so as to manage the code permissions of the target code in the corresponding code repository based on the permission management template, thereby realizing unified management of the code permissions of multiple different code repositories through multiple permission management templates, solving the technical problem that the configuration of code permissions in related technologies is cumbersome and prone to confusion, which is not conducive to the management of code permissions of code repositories.

[0047] In an exemplary implementation, the code project information includes at least functional requirement information of the target code, the permission management template includes at least one code permission group, and step S103 includes steps S1031 to S1032.

[0048] Step S1031, determine the user's role and the code permission corresponding to the role according to the function requirement information, and build at least one code permission group according to the function requirement information, the role and the code permission, the code permission group includes the correspondence between the function requirement information and the role, and the correspondence between the role and at least one code permission.

[0049] Step S1032: construct a rights management template for the code repository according to the rights configuration rules and at least one code rights group.

[0050] In the field of software development, each user may play different roles in different code project information. Roles generally include: owner, developer, reviewer, visitor, etc. For example, in the same code repository, user A plays the role of owner in the project of developing chat software, and plays the role of visitor in the project of developing financial software. In practical applications, it is necessary to determine which users play which roles and the code permissions corresponding to the roles based on the functional requirements information of the code project information, and then build a code permission group based on the functional requirements information, roles and code permissions. In general, one code permission group can be built for one functional requirement information, or one code permission group can be built for all functional requirements information. The correspondence between functional requirement information and roles, and the correspondence between roles and at least one code permission refers to the form of functional requirement information-role-code permission, and correspondingly, the code permission group is built in the form of code repository-functional requirement information-role-code permission.

[0051] It is understandable that after determining at least one code permission group, a permission management template is constructed based on at least one code permission group according to corresponding permission configuration rules. Figure 4 As shown, taking the permission management template of the Gerrit code repository as an example, the permission management template includes code permission groups corresponding to multiple projects, for example, Project 1-Owner, Project 1-Reviewer, Project 1-Developer, etc. Each code permission group can be responsible for different roles, each role is configured with at least one code permission, and each code permission group can also include a minimum permission set obtained by subdividing multiple code permissions. The code permission group in the embodiment of the present application can be defined as an LDAP (Lightweight Directory Access Protocol) group, and the permission management template can only include LDAP groups. Of course, if some code repositories do not support LDAP integration, the LDAP group can be synchronized to the permission management template of the code repository regularly. After the permission management template is imported into the corresponding code repository, under normal circumstances, it is not necessary to frequently change the permission management template. When it is necessary to re-establish a development project or change the division of labor of the original project, it is necessary to modify the permission management template. If it is only the code permission group in the permission management template, that is, when the user division of labor in the LDAP group changes, it is not necessary to modify the permission management template, and only the users in the code permission group can be adjusted. For example, when you need to assign permissions to a user, you can add the user to the corresponding code permission group.

[0052] In an exemplary implementation, step S104 includes step S1041 to step S1042.

[0053] Step S1041: According to the permission adjustment operation, the code permission group in the permission management template is adjusted.

[0054] Step S1042: managing the code permissions of the target code in the code repository based on the adjusted permission management template.

[0055] Permission adjustment operations can include permission addition operations, permission deletion operations, and permission modification operations. When a permission adjustment operation is obtained, the code permission group in the permission management template can be adjusted according to the actual permission adjustment content. Then, the code permissions of the target code in the code repository are managed based on the adjusted permission management template. There is no need to adjust the permission management template of the code repository through the login accounts of different code repositories. This not only simplifies the various account login verification steps before permission configuration, but also facilitates the unified management of code permissions in the code repository.

[0056] Specifically, when a permission adding operation is received, a code permission group is added to the permission management template of the code repository corresponding to the permission adding operation. When a permission deleting operation is received, the code permission group corresponding to the permission deleting operation is deleted from the permission management template of the code repository corresponding to the permission deleting operation. When a permission modifying operation is received, the code permission group corresponding to the permission modifying operation is modified from the permission management template of the code repository corresponding to the permission modifying operation.

[0057] It can be understood that when a permission increase operation is received, the added roles and code permissions are determined based on the functional requirement information added to the target code corresponding to the permission increase operation; based on the added functional requirement information, the added roles and the added code permissions, a new code permission group is constructed in the permission management template of the code repository corresponding to the permission increase operation.

[0058] When developing a chat software system, if you need to add functional requirement information, such as adding different cartoon emoticon packages, determine the added roles and code permissions based on the added functional requirement information, and then build a new code permission group in the permission management template of the code repository corresponding to the permission addition operation in the form of functional requirement information-role-code permission. If in the process of developing the software system, it is found that some functional requirement information cannot be implemented or is unnecessary to implement, or some code permission groups need to be removed, the corresponding code permission group can be deleted when the permission deletion operation is received. In addition, if a user needs to apply for a change in role and code permissions based on the original permissions, he can apply to the administrator of the code repository. After the review is passed, the administrator will modify the code permission group and assign permissions, for example, modify the number of roles or the number of code permissions in the corresponding code permission group.

[0059] It is understandable that the embodiments of the present application can periodically clean up the rights management template so that the data in the rights management template is more accurate and convenient for subsequent management. For example, when a user's code permission expires, the user is removed from the code permission group to which the user belongs; when a user with code permission resigns, the user's account is invalidated to prevent the company's development data from being leaked.

[0060] In an exemplary implementation, the method may further include: after receiving the permission query operation, displaying the code permissions of at least one code repository corresponding to the account according to the account of the user corresponding to the permission query operation.

[0061] When a permission query operation corresponding to a user's account is received, the code permissions of different code repositories corresponding to the user's account are displayed. The embodiment of the present application can support multi-dimensional query of code permissions. For example, the code permissions and roles of a user corresponding to different functional requirement information in each code repository can be queried. Specifically, if the user's role is the owner of a code repository, you can choose to query the permission configuration of the corresponding code repository to facilitate auditing of different code repositories or users.

[0062] In an exemplary implementation, the method may further include: after receiving an export operation, exporting a rights management template of a code repository corresponding to the export operation, and displaying the template in a list form.

[0063] To facilitate the audit of different code repositories, you can export the permission management template of the corresponding code repository after receiving the export operation and display it in an Excel table, so as to understand the permission configuration of each code repository.

[0064] See also Figure 5 , Figure 5 1 is a schematic block diagram of a code authority management device provided in an embodiment of the present application. The code authority management device can be configured in a server or an electronic device to execute the aforementioned code authority management method.

[0065] like Figure 5 As shown, the code authority management device includes: a first acquisition module 110, a second acquisition module 120, a construction module 130 and a management module 140.

[0066] The first acquisition module 110 is used to acquire code project information of the target code.

[0067] The second acquisition module 120 acquires the permission configuration rules of the code repository corresponding to the target code.

[0068] The construction module 130 is used to construct a rights management template for the code repository according to the code project information and the rights configuration rules.

[0069] The management module 140 is used to manage the code permissions of the target code in the code repository based on the permission management template.

[0070] In an exemplary implementation, the code project information includes at least functional requirement information of the target code, the permission management template includes at least one code permission group, and the construction module 130 may include a first construction submodule and a second construction submodule.

[0071] The first construction submodule is used to determine the user's role and the code permission corresponding to the role according to the functional requirement information, and to construct at least one code permission group according to the functional requirement information, the role and the code permission. The code permission group includes the correspondence between the functional requirement information and the role, and the correspondence between the role and at least one code permission.

[0072] The second construction submodule is used to construct a permission management template for the code repository according to the permission configuration rules and at least one code permission group.

[0073] In an exemplary implementation, the management module 140 may include an adjustment submodule and a management submodule.

[0074] The adjustment submodule is used to adjust the code permission group in the permission management template according to the permission adjustment operation.

[0075] The configuration management submodule is used to manage the code permissions of the target code in the code repository based on the adjusted permission management template.

[0076] In an exemplary embodiment, the adjustment submodule is specifically used to, when receiving a permission addition operation, add a code permission group in the permission management template of the code repository corresponding to the permission addition operation; when receiving a permission deletion operation, delete the code permission group corresponding to the permission deletion operation from the permission management template of the code repository corresponding to the permission deletion operation; when receiving a permission modification operation, modify the code permission group corresponding to the permission modification operation from the permission management template of the code repository corresponding to the permission modification operation.

[0077] In an exemplary embodiment, the adjustment sub-module can be used to determine the added roles and code permissions based on the functional requirement information added to the target code corresponding to the permission increase operation when a permission increase operation is received; based on the added functional requirement information, the added roles and the added code permissions, a newly added code permission group is constructed in the permission management template of the code repository corresponding to the permission increase operation.

[0078] In an exemplary implementation, the code authority management apparatus may further include a query module.

[0079] The query module is used to display the code permissions of at least one code repository corresponding to the account according to the account of the user corresponding to the permission query operation after receiving the permission query operation.

[0080] In an exemplary implementation, the code permission management apparatus may further include an export module.

[0081] The export module is used to export the permission management template of the code repository corresponding to the export operation after receiving the export operation, and display it in a list form.

[0082] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0083] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0084] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a computer device.

[0085] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or an electronic device.

[0086] like Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.

[0087] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute the steps of any code permission management method.

[0088] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0089] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute the steps of any code permission management method.

[0090] The network interface is used for network communication, such as sending assigned tasks.

[0091] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0092] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0093] In one embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:

[0094] Get the code project information of the target code;

[0095] Get the permission configuration rules of the code repository corresponding to the target code;

[0096] Build a permission management template for the code repository based on code project information and permission configuration rules;

[0097] Manage the code permissions of target codes in the code repository based on the permission management template.

[0098] In one embodiment, the code project information includes at least functional requirement information of the target code, the permission management template includes at least one code permission group, and the permission management template of the code repository is constructed according to the code project information and the permission configuration rules, including:

[0099] Determine the user's role and the code permission corresponding to the role according to the function requirement information, and construct at least one code permission group according to the function requirement information, the role and the code permission, wherein the code permission group includes the correspondence between the function requirement information and the role, and the correspondence between the role and at least one code permission;

[0100] Build a permission management template for the code repository based on permission configuration rules and at least one code permission group.

[0101] In one embodiment, managing the code permissions of target code in a code repository based on a permissions management template includes:

[0102] According to the permission adjustment operation, adjust the code permission group in the permission management template;

[0103] Manage the code permissions of the target code in the code repository based on the adjusted permission management template.

[0104] In one embodiment, adjusting the code permission group in the permission management template according to the permission adjustment operation includes at least one of the following:

[0105] When receiving a permission adding operation, a code permission group is added to the permission management template of the code repository corresponding to the permission adding operation;

[0106] When receiving a permission deletion operation, deleting the code permission group corresponding to the permission deletion operation from the permission management template of the code repository corresponding to the permission deletion operation;

[0107] When a permission modification operation is received, the code permission group corresponding to the permission modification operation is modified from the permission management template of the code repository corresponding to the permission modification operation.

[0108] In one embodiment, when a permission adding operation is received, a code permission group is added to the permission management template of the code repository corresponding to the permission adding operation, including:

[0109] When receiving a permission increase operation, determining the added role and code permissions according to the functional requirement information added by the target code corresponding to the permission increase operation;

[0110] According to the added functional requirement information, added roles, and added code permissions, a new code permission group is constructed in the permission management template of the code repository corresponding to the permission addition operation.

[0111] In one embodiment, it further includes:

[0112] After receiving the permission query operation, according to the account of the user corresponding to the permission query operation, the code permissions of at least one code repository corresponding to the account are displayed.

[0113] In one embodiment, it further includes:

[0114] After receiving the export operation, the permission management template of the code repository corresponding to the export operation is exported and displayed in a list form.

[0115] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above description of data recommendation can refer to the corresponding process in the embodiment of the aforementioned data recommendation method, and will not be repeated here.

[0116] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the data recommendation method of the present application.

[0117] The computer-readable storage medium may be an internal storage unit of the computer device of the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device.

[0118] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0119] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0120] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A code authority management method, characterized in that: include: Get the code project information of the target code; Obtaining permission configuration rules for the code repository corresponding to the target code; Constructing a rights management template for the code repository according to the code project information and the rights configuration rules; The code permissions of the target code in the code repository are managed based on the permission management template.

2. The code authority management method according to claim 1, characterized in that: The code project information includes at least functional requirement information of the target code, the permission management template includes at least one code permission group, and the permission management template of the code repository is constructed according to the code project information and the permission configuration rule, including: Determine the user's role and the code permission corresponding to the role according to the function requirement information, and construct at least one code permission group according to the function requirement information, the role and the code permission, the code permission group including the correspondence between the function requirement information and the role, and the correspondence between the role and at least one of the code permissions; A permission management template for the code repository is constructed according to the permission configuration rule and at least one of the code permission groups.

3. The code authority management method according to claim 2, characterized in that: The managing the code permissions of the target code in the code repository based on the permission management template includes: According to the permission adjustment operation, adjusting the code permission group in the permission management template; The code permissions of the target code in the code repository are managed based on the adjusted permission management template.

4. The code authority management method according to claim 3, characterized in that: The step of adjusting the code permission group in the permission management template according to the permission adjustment operation includes at least one of the following: When receiving a permission adding operation, adding a code permission group in the permission management template of the code repository corresponding to the permission adding operation; When receiving a permission deletion operation, deleting the code permission group corresponding to the permission deletion operation from the permission management template of the code repository corresponding to the permission deletion operation; When a permission modification operation is received, the code permission group corresponding to the permission modification operation is modified from the permission management template of the code repository corresponding to the permission modification operation.

5. The code authority management method according to claim 4, characterized in that: When the permission adding operation is received, a code permission group is added to the permission management template of the code repository corresponding to the permission adding operation, including: When receiving a permission adding operation, determining the added role and code permissions according to the functional requirement information added by the target code corresponding to the permission adding operation; According to the added functional requirement information, the added role, and the added code permission, a newly added code permission group is constructed in the permission management template of the code repository corresponding to the permission adding operation.

6. The code authority management method according to claim 2, characterized in that: Also includes: After receiving the permission query operation, according to the account of the user corresponding to the permission query operation, the code permissions of at least one code repository corresponding to the account are displayed.

7. The code authority management method according to any one of claims 1 to 5, characterized in that: Also includes: After receiving the export operation, the permission management template of the code repository corresponding to the export operation is exported and displayed in a list form.

8. A code authority management device, characterized in that: include: A first acquisition module is used to acquire code project information of the target code; A second acquisition module acquires the permission configuration rules of the code repository corresponding to the target code; A construction module, used to construct a rights management template for the code repository according to the code project information and the rights configuration rules; A management module is used to manage the code permissions of the target code in the code repository based on the permission management template.

9. A computer device, characterized in that: Computer equipment includes memory and processor; Memory for storing computer programs; A processor, configured to execute a computer program and implement the code permission management method as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the code permission management method as described in any one of claims 1 to 7 are implemented.