Folder permission detection method and device, electronic equipment and storage medium

文档序号:190932 发布日期:2021-11-02 浏览:28次 中文

阅读说明:本技术 文件夹权限的检测方法、装置、电子设备及存储介质 (Folder permission detection method and device, electronic equipment and storage medium ) 是由 王达 于 2021-08-02 设计创作,主要内容包括:本发明实施例公开了一种文件夹权限的检测方法、装置、电子设备及存储介质。该方法通过在目标引擎的编辑器的启动过程中加载的预先构建的权限检测钩子文件,对项目工程程序集中所配置的每个目标用户对每个项目文件夹的使用权限进行检测,进而根据检测的结果确定是否继续执行开启目标引擎的编辑器的操作,实现了编辑器启动过程中文件夹使用权限的自动检测,使得配置错误的使用权限可以在编辑器启动过程中被及时发现,进而实现了文件夹使用权限的及时验证,避免了由于权限配置错误所导致的文件无法存储和文件再次编辑,提高了项目的开发效率以及开发体验感。(The embodiment of the invention discloses a method and a device for detecting folder permission, electronic equipment and a storage medium. The method detects the use permission of each project folder of each target user configured in a project engineering program set through a pre-constructed permission detection hook file loaded in the starting process of an editor of a target engine, and further determines whether to continue to execute the operation of starting the editor of the target engine according to the detection result, so that the automatic detection of the use permission of the folders in the starting process of the editor is realized, the use permission with wrong configuration can be found in time in the starting process of the editor, the timely verification of the use permission of the folders is further realized, the situation that files cannot be stored and can be edited again due to wrong permission configuration is avoided, and the development efficiency and the development experience of projects are improved.)

1. A method for detecting file folder authority is characterized by comprising the following steps:

loading a project engineering program set of a target engine and a pre-constructed authority detection hook file in the starting process of an editor of the target engine, wherein the project engineering program set comprises the use authority of each target user configured based on a local description file to each project folder;

detecting the use permission of each configured target user to each project folder based on the permission detection hook file;

and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

2. The method according to claim 1, wherein the detecting the usage right of each configured target user to each item folder based on the right detection hook file comprises:

and acquiring a remote description file corresponding to the local description file from a right server based on the right detection hook file, and detecting the use right of each configured target user to each project folder based on the remote description file and the local description file.

3. The method according to claim 2, wherein the obtaining a remote description file corresponding to the local description file from a rights server based on the rights detection hook file comprises:

and acquiring a description file which is consistent with the version information of the local description file or has version information higher than that of the local description file from at least one description file of the use authority of each target user to each project folder stored by a right server based on the authority detection hook file, wherein the description file is used as a remote description file corresponding to the local description file.

4. The method according to claim 2, wherein the detecting of the usage right of each configured target user to each project folder based on the remote description file and the local description file comprises:

if the file updating time of the remote description file is later than that of the local description file, detecting the use permission of each configured target user to each project folder based on the remote description file;

and if the usage right of each target user to each project folder recorded by the remote description file is consistent with the configured usage right of each target user to each project folder, determining the detection result of the configured usage right of each target user to each project folder as detected passing.

5. The method of claim 4, wherein determining whether to continue executing the operation of opening the editor of the target engine based on the detection result comprises:

if the usage right of each project folder recorded by the remote description file by each target user is inconsistent with the configured usage right of each project folder by each target user, calling a right updating class in the right detection hook file, updating the configured usage right of each project folder by each target user based on the remote description file, or generating right prompt information and displaying the right prompt information.

6. The method according to claim 2, wherein the detecting of the usage right of each configured target user to each project folder based on the remote description file and the local description file comprises:

and if the file updating time of the remote description file is earlier than that of the local description file, determining that the detection result of the detection of the use permission of each configured target user to each project folder is passed.

7. The method of claim 1, wherein determining whether to continue executing the operation of opening the editor of the target engine based on the detection result comprises:

and if the detection result is that the detection is passed, continuing to execute the operation of opening the editor of the target engine.

8. A device for detecting file folder permissions, comprising:

the hook file loading module is used for loading a project engineering assembly and an authority detection hook file of the target engine in the starting process of an editor of the target engine, wherein the project engineering assembly comprises the use authority of each target user on each project folder configured based on a local description file;

the permission detection module is used for detecting the use permission of each configured target user to each project folder based on the permission detection hook file;

and the opening operation execution module is used for determining whether to continue executing the operation of opening the editor of the target engine based on the detection result.

9. An electronic device, characterized in that the electronic device comprises:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement a method of detecting folder permissions according to any of claims 1-7.

10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of detecting folder rights as claimed in any one of claims 1 to 7.

Technical Field

The embodiment of the invention relates to the technical field of computer application, in particular to a method and a device for detecting folder permission, electronic equipment and a storage medium.

Background

Game development is not open to a wide variety of game resources. To facilitate management of various game resources, different game resources may be stored in different folders. For information security, there may be cases where folders can only be used by designated persons.

In the game development process, a game developer edits a file for optimizing the game resource through an editor of the game engine, and updates the edited file to a folder which stores the file corresponding to the updated game resource. If the game developer does not have folder usage rights to store the edited file, the file edited by the game developer cannot be saved.

In the process, if a game developer who should have the usage permission of the folder does not have the usage permission, and the game developer can find the problem that the folder does not have the usage permission only when the file is edited and stored and the file storage fails, the file cannot be stored, the development efficiency of the game is affected, and the time for finding the problem is too late, so that the development experience is affected.

Disclosure of Invention

The embodiment of the invention provides a method and a device for detecting file folder permission, electronic equipment and a storage medium, so that the file folder permission can be verified in time, and further, the development efficiency and the development experience of a project are improved.

In a first aspect, an embodiment of the present invention provides a method for detecting a folder right, including:

loading a project engineering program set of a target engine and a pre-constructed authority detection hook file in the starting process of an editor of the target engine, wherein the project engineering program set comprises the use authority of each target user configured based on a local description file to each project folder;

detecting the use permission of each configured target user to each project folder based on the permission detection hook file;

and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

Optionally, the detecting, based on the permission detection hook file, the usage permission of each configured target user to each project folder includes:

and acquiring a remote description file corresponding to the local description file from a right server based on the right detection hook file, and detecting the use right of each configured target user to each project folder based on the remote description file and the local description file.

Optionally, the obtaining, from the right server, the remote description file corresponding to the local description file based on the right detection hook file includes:

and acquiring a description file which is consistent with the version information of the local description file or has version information higher than that of the local description file from at least one description file of the use authority of each target user to each project folder stored by a right server based on the authority detection hook file, wherein the description file is used as a remote description file corresponding to the local description file.

Optionally, the detecting, based on the remote description file and the local description file, the usage right of each configured target user to each project folder includes:

if the file updating time of the remote description file is later than that of the local description file, detecting the use permission of each configured target user to each project folder based on the remote description file;

and if the usage right of each target user to each project folder recorded by the remote description file is consistent with the configured usage right of each target user to each project folder, determining the detection result of the configured usage right of each target user to each project folder as detected passing.

Optionally, the determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes:

if the usage right of each project folder recorded by the remote description file by each target user is inconsistent with the configured usage right of each project folder by each target user, calling a right updating class in the right detection hook file, updating the configured usage right of each project folder by each target user based on the remote description file, or generating right prompt information and displaying the right prompt information.

Optionally, the detecting, based on the remote description file and the local description file, the usage right of each configured target user to each project folder includes:

and if the file updating time of the remote description file is earlier than that of the local description file, determining that the detection result of the detection of the use permission of each configured target user to each project folder is passed.

Optionally, the determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes:

and if the detection result is that the detection is passed, continuing to execute the operation of opening the editor of the target engine.

In a second aspect, an embodiment of the present invention further provides a device for detecting a folder right, including:

the hook file loading module is used for loading a project engineering assembly and an authority detection hook file of the target engine in the starting process of an editor of the target engine, wherein the project engineering assembly comprises the use authority of each target user on each project folder configured based on a local description file;

the permission detection module is used for detecting the use permission of each configured target user to each project folder based on the permission detection hook file;

and the opening operation execution module is used for determining whether to continue executing the operation of opening the editor of the target engine based on the detection result.

In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:

one or more processors;

a storage device for storing one or more programs,

when the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting the folder right according to any embodiment of the present invention.

In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for detecting the folder right according to any embodiment of the present invention.

The embodiment of the invention has the following advantages or beneficial effects:

the method comprises the steps of detecting the use permission of each project folder by each target user configured in a project engineering program set through a pre-constructed permission detection hook file loaded in the starting process of an editor of a target engine, determining whether to continue to execute the operation of starting the editor of the target engine according to a detection result, automatically detecting the use permission of the folders in the starting process of the editor, finding out the use permission with wrong configuration in time in the starting process of the editor, verifying the use permission of the folders in time, avoiding the situation that files cannot be stored and edited again due to wrong permission configuration, and improving the development efficiency and development experience of projects.

Drawings

In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.

Fig. 1 is a schematic flowchart of a method for detecting file permissions according to an embodiment of the present invention;

fig. 2 is a schematic flowchart of a method for detecting file permissions according to a second embodiment of the present invention;

fig. 3 is a schematic flowchart of a method for detecting file permissions according to a third embodiment of the present invention;

fig. 4 is a schematic structural diagram of a device for detecting file permissions according to a fourth embodiment of the present invention;

fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Example one

Fig. 1 is a schematic flowchart of a method for detecting folder permissions according to an embodiment of the present invention, where this embodiment is applicable to a situation that usage permissions of each item folder by each configured user are detected in a process of starting an editor of an engine, and the method may be executed by a device for detecting folder permissions, where the device may be implemented by hardware and/or software, and the method specifically includes the following steps:

and S110, loading a project engineering program set of the target engine and a pre-constructed authority detection hook file in the starting process of the editor of the target engine.

Where the target engine may be the engine that is currently launching the editor. Illustratively, the target engine may be a tool that provides developers with a large number of core technologies, basic support, or function calls. For example, the target engine may be a game engine including, but not limited to, a Unity engine, a ghost engine, a script engine, a physics engine, a rendering engine, and a web engine, among others. Taking a rendering engine as an example, all effects such as character models, animations, light shadows, special effects and the like can be calculated in real time by using the rendering engine and displayed on a screen; taking the physical engine as an example, the physical engine can be used for enabling the motion of objects in the game to follow a fixed rule, such as the jump height of a specified character, the running speed, the flying speed, the moving track of a move style and the like.

In this embodiment, the starting process of the editor of the target engine may include the following steps: 1. initializing a basic configuration of a target engine; 2. compiling all codes of the target engine; 3. importing project resources of a target engine; 4. and importing a numerical value file of the target engine.

Wherein all codes of the compiled target engine include: a native code library of the target engine, a plug-in layer code of the target engine, an overall code of the project of the target engine, and a third party library of the target engine or a plug-in library of a software development kit. Project resources of the target engine may include resources such as character models, building models, weapon models, maps, actions, bones, prefab preforms, and so on. The value file of the target engine can be a file describing a model basic value, an action related value or a scene related value; such as model height values, weapon appearance values, weapon firing values, character motion speed values, special effect time values, scene transparency values, and the like.

Specifically, in this embodiment, in any step in the starting process of the editor of the target engine, a pre-constructed permission detection hook file and a project engineering assembly of the target engine may be loaded; or, loading a pre-constructed authority detection hook file in any step in the starting process of the editor of the target engine, and loading a project engineering program set of the target engine in the step of compiling all codes of the target engine.

The project engineering assembly comprises the use permission of each target user to each project folder configured based on the local description file. Specifically, the local description file may be a file describing configuration information of usage authority information of each item folder by each target user; for example, user A: the number of readable and writable files is 50; b, user: the number of the readable and writable files is 100; c, user: all files can be read and written; or, the A user: the readable and writable file comprises file _1 to file _ 50. Optionally, the local description file may further include a permission level of each target user; for example, user A: level 3, B user: level 2, user C: grade 1. For example, the project engineering assembly may contain the usage rights of each target user to each project folder configured according to the configuration information described in the local description file.

In this embodiment, the pre-constructed permission detection hook file may be a file for performing folder readable and writable permission detection; or, the permission detection hook file can also be a file for detecting the writable permission of the folder. Specifically, the permission detection hook file may include an instruction to call a folder permission detection method. The permission detection hook file may be a hook file, such as a.dll file, a.lab file, etc. Illustratively, the rights detection hook file may be an enginepreentryhook. Illustratively, an engineering PreEntryHook can be constructed in advance based on a C # generation dll method of a target engine, so that an EnginePreEntryHook.dll file is generated and used as an authority detection hook file. Optionally, the enginepreentryhook.dll file may be placed under an EngineDll directory in the project engineering, and maintained separately and independently from dll files inside other engines; the EnginePreEntryHook.dll file under the EngineDll directory within the project is automatically map-updated after each write of the EnginePreEntryHook internal code.

In a specific embodiment, before the numeric file of the target engine is imported in the starting process of the editor, a project engineering program set and a pre-constructed authority detection hook file can be loaded; or loading a project engineering program set and a pre-constructed authority detection hook file before importing project resources of a target engine. Compared with the scheme of detecting the use permission after the numerical value file or the project resource is imported, the problem of the folder permission can be found more quickly, and the speed of detecting the folder permission is further improved.

In another specific implementation, considering that the operation of compiling all the codes of the target engine may change the usage permission, the project engineering program set and the pre-constructed permission detection hook file may be loaded after compiling all the codes of the target engine and before importing the project resources of the target engine, so as to further improve the speed of permission detection while ensuring the detection accuracy of permission detection.

In another specific embodiment, a pre-constructed permission detection hook file and a project engineering assembly can be loaded in the process of compiling all codes of the target engine. That is, the method for detecting the folder right provided by the embodiment further includes:

loading a native code library of a target engine; loading an engine plug-in layer program set of a target engine; loading a project engineering program set constructed in advance; loading a pre-constructed third-party software development kit program set;

loading a pre-constructed authority detection hook file, wherein the loading comprises at least one of the following operations:

when the loading of a native code library of a target engine is finished, loading a pre-constructed authority detection hook file; or when the loading of the engine plug-in layer program set of the target engine is finished, loading a pre-constructed authority detection hook file; or when the loading of the pre-constructed project engineering program set is finished, loading the pre-constructed authority detection hook file; or when the loading of the pre-constructed third-party software development kit program set is completed, loading the pre-constructed authority detection hook file.

Wherein the native code library of the target engine may contain the base code of the target engine; for example, a native code library may contain a UnityEngine series dll file. The engine plug-in layer assembly of the target engine may contain plug-in layer code or program code that calls native code; such as dll files containing package and plugin families. The pre-constructed project engineering assembly may also include all program codes of the project engineering; such as the complete program code of a game Project, may be dll file code of Project series. The set of pre-built third party Software Development Kit packages may contain a third party library or plug-in library files of an SDK (Software Development Kit). Illustratively, the third party software development kit package may be a sound effect Wwise, a game SDK, or the like.

Specifically, in this alternative embodiment, the method may include loading a native code library of the target engine, loading an engine plug-in layer program set of the target engine, loading a pre-constructed project engineering program set, and loading a pre-constructed third-party software development kit program set, so as to compile the native code library, the engine plug-in layer program set, the project engineering program set, and the third-party software development kit program set. It should be noted that, the loading sequence is: a native code library, an engine plug-in layer assembly, a project engineering assembly, and a third party software development kit assembly.

In the optional implementation mode, when the loading of the native code library, the engine plug-in layer program set, the project engineering program set or the third-party software development kit program set is completed, the pre-constructed permission detection hook file is loaded, so that the detection of the configured folder use permission can be guaranteed to be completed before the project resources of the target engine are imported, the inspection time of the folder use permission is further reduced, the inspection efficiency of the folder use permission is improved, and the development efficiency of the project is further greatly improved.

Optionally, the engine load code of the target engine may be modified, and the permission detection hook file is sent to a first priority load queue (native code library load queue), so that the permission detection hook file is loaded after the native code library is loaded. According to the method, only the permission detection hook file is added to the first priority loading queue, the whole target engine does not need to be adjusted, and the applicability of the folder permission detection method provided by the embodiment is improved.

Certainly, in this embodiment, when the native code library of the target engine is compiled, a hook (permission detection hook file) may be added for compiling, and when the pre-constructed project engineering assembly is compiled (loaded), the hook triggers to detect the configured folder permission to use.

And S120, detecting the use permission of each configured target user to each project folder based on the permission detection hook file.

In this embodiment, the detecting, based on the permission detection hook file, the usage permission of each configured target user for each project folder may be: and triggering the operation of detecting the use permission of each configured target user to each project folder through the permission detection hook file.

Specifically, the detecting of the usage right of each configured target user to each project folder based on the right detection hook file may be: and acquiring preset use permission information corresponding to the target engine from the permission server based on the permission detection hook file, and comparing the use permission of each configured target user to each project folder with the preset use permission information according to the permission detection hook file. The authority server can locally store preset use authority information corresponding to each engine in the server; or, the system is connected with a warehouse for storing the preset use authority information, and the preset use authority information is read from the warehouse.

In an optional implementation manner, in consideration of that when the configured usage right of each target user to each item folder is detected one by one, the detection complexity is high, and in order to further reduce the detection time of the folder usage right, the usage right of each configured target user to each item folder is detected based on the right detection hook file, and the method may further include: and determining the number of the configured item folders with the use permission of each target user, and detecting the number of the item folders with the use permission of each target user based on the permission detection hook file. Specifically, the number of the configured item folders each target user has the usage right may be compared with the number of the item folders each target user has the usage right in the preset usage right information corresponding to the target engine in the right server.

It should be noted that, in the above optional embodiment, if it is detected that the number of the item files having the usage right of the target user is inconsistent with the number of the preset usage right information in the right server, the detection result may be that the detection fails, and the usage right of each configured target user to each item folder is updated according to the preset usage right information in the right server, or the usage right of each item folder is updated according to the target user with inconsistent number of the preset usage right information in the right server.

Illustratively, the configured number of project files with usage rights of each target user includes: AA user-50; b, user-100; c, user: all the files; the number of the item files of which each target user has the use authority in the preset use authority information corresponding to the target engine in the authority server comprises: a, user-50; b, user-100; c, user-100; at this time, the usage right of the C user to each item folder may be updated according to the preset usage right information in the right server.

Of course, in order to further reduce the detection time of the folder usage right, the usage right of each configured target user to each project folder is detected based on the right detection hook file, and the following steps may also be performed: comparing the modification time of each configured target user on the use permission of each project folder with the modification time of preset use permission information; or comparing the modified version of the configured use authority of each target user to each project folder with the modified version of the preset use authority information.

And S130, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

In this embodiment, if the detection result is that the detection is passed, it may be determined that the configured usage right of each target user for each project folder is correct, and the operation of starting the editor of the target engine may be continuously performed. If the detection result is that the detection is failed, the operation of the editor for starting the target engine can be suspended, the use permission of each configured target user for each project folder is updated, and the operation of the editor for starting the target engine is continuously executed based on the updated use permission of each configured target user for each project folder.

That is, determining whether to continue to perform the operation of opening the editor of the target engine based on the detection result includes: and if the detection result is that the detection is passed, continuing to execute the operation of opening the editor of the target engine. Or, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result, including: and if the detection result is that the detection is not passed, updating the use authority of each configured target user to each project folder.

Illustratively, if the permission detection hook file is loaded when the native code library of the target engine is loaded, when the pre-constructed project engineering assembly is loaded, the permission detection hook file is used for detecting the use permission of each configured target user for each project folder, and the detection result shows that the permission detection hook file passes the detection, the operation of loading the pre-constructed third-party software development kit assembly can be continuously executed, so that the operation of starting the editor of the target engine is continuously executed; if the detection result is that the detection fails, the operation of the editor for starting the target engine may be stopped.

According to the technical scheme, the use permission of each project folder of each target user configured in a project engineering program set is detected through the pre-constructed permission detection hook file loaded in the starting process of the editor of the target engine, whether the operation of starting the editor of the target engine is continuously executed is determined according to the detection result, the automatic detection of the use permission of the folders in the starting process of the editor is realized, the use permission with wrong configuration can be timely found in the starting process of the editor, the timely verification of the use permission of the folders is further realized, the situation that files cannot be stored and can not be edited again due to wrong permission configuration is avoided, and the development efficiency and the development experience of projects are improved.

In the prior art, an editor needs to be completely started, after the editor is started and used for editing a file and storing the file, if the storage fails, it can be determined that the folder right is not opened, and in the scheme that the right application needs to be manually submitted, the editor needs to be completely started for at least 20 minutes, so that the folder right error or right expiration can be found only after the scheme in the prior art needs at least 20 minutes.

Example two

Fig. 2 is a schematic flow chart of a method for detecting file folder permissions according to a second embodiment of the present invention, where this embodiment, optionally, on the basis of the foregoing embodiments, detects, based on a permission detection hook file, usage permissions of each configured target user on each item file folder, and includes: and acquiring a remote description file corresponding to the local description file from the right server based on the right detection hook file, and detecting the use right of each configured target user to each project folder based on the remote description file and the local description file.

Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 2, the method for detecting the folder right provided by this embodiment includes the following steps:

s210, loading a project engineering program set of the target engine and a pre-constructed authority detection hook file in the starting process of the editor of the target engine.

The project engineering assembly comprises the use permission of each target user to each project folder configured based on the local description file.

S220, acquiring a remote description file corresponding to the local description file from the right server based on the right detection hook file, and detecting the use right of each configured target user to each project folder based on the remote description file and the local description file.

The remote description file may be a file of configuration information for describing the usage right of each user for each project folder. Optionally, the remote description file may be stored in the authority server, or stored in a database corresponding to the authority server.

For example, the embodiment may read and acquire a remote description file corresponding to the local description file from the rights server based on the rights detection hook file through the engine identifier of the target engine.

Or, acquiring a remote description file corresponding to the local description file from the rights server based on the rights detection hook file, including: and acquiring a description file which is consistent with the version information of the local description file or has version information higher than that of the local description file from at least one description file of the use authority of each target user to each project folder stored by the authority server based on the authority detection hook file, wherein the description file is used as a remote description file corresponding to the local description file.

That is, the description file in the authority server that is consistent with the version information of the local description file or the description file whose version information is higher than that of the local description file is acquired as the remote description file corresponding to the local description file. The description file with the version information consistent or higher than that of the local description file is used as the remote description file, the version of the remote description file is not lower than that of the local description file, the local description file and the description file with the version consistent or higher than that of the local description file are compared, and the detection accuracy of the use permission is improved.

Specifically, in this embodiment, the detection of the usage right of each configured target user to each project folder based on the remote description file and the local description file may be: and calling an authority detection class of the authority detection hook file, and detecting the use authority of each configured target user to each project folder based on the remote description file and the local description file. The permission detection class may be a class file written in the permission detection hook file in advance and used for triggering comparison between the local description file and the remote description file. The permission detection class may include program code that calls a description file comparison method. Illustratively, the C # rights detection class PASsetschecking may be written within the EnginePreEntryhook project.

Optionally, the detecting, based on the remote description file and the local description file, the usage right of each configured target user to each project folder may be: and comparing the remote description file with the local description file to detect the use permission of each configured target user to each project folder through the file comparison.

The file comparison between the remote description file and the local description file may be: comparing the file updating time of the remote description file with the file updating time of the local description file; or comparing the file content of the local description file with the file content of the remote description file.

Optionally, the comparing the file content of the local description file with the file content of the remote description file may be: and determining a local file hash value corresponding to the local description file and a remote file hash value corresponding to the remote description file, and comparing the local file hash value with the remote file hash value.

In an optional implementation manner, detecting, based on the remote description file and the local description file, the usage right of each configured target user to each project folder may further be: and if the file updating time of the remote description file is earlier than that of the local description file, determining that the detection result of the detection of the use permission of each configured target user to each project folder is passed.

Wherein the file update time may be a latest modification time of the description file. Specifically, if the file update time of the remote description file is the same as that of the local description file, it may be indicated that, after the local description file is pulled from the authority server, both the local description file and the remote description file in the authority server are not modified, or the local description file and the remote description file in the authority server are modified synchronously. If the file update time is different, it may indicate that after the local description file is pulled from the authority server, the remote description file in the authority server is modified, or the local description file is modified, or the modification time of the local description file is different from that of the remote description file.

In this optional embodiment, when the file update time of the remote description file is earlier than the file update time of the local description file, it may be indicated that the usage right configured according to the local description file is the latest, at this time, detection according to the remote description file is not required, and the detection result is that the detection is passed. By the method, the configured use permission can be ensured to be latest, and the detection accuracy of the use permission is further improved.

Of course, if the file update time of the remote description file is later than the file update time of the local description file, the usage permission of each configured target user to each project folder may be further detected according to the remote description file and the local description file. For example, the remote description file is compared with the local description file for comparing the file contents, or the number of item folders that the target user has the right to use is compared, and so on.

And S230, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

Specifically, if the file content of the local description file is consistent with the file content of the remote description file, the detection result is that the detection is passed; and if the file content of the local description file is inconsistent with the file content of the remote description file, the detection result is that the detection is failed.

Or if the number of the item folders which each target user has the use authority in the local description file is consistent with the number of the item folders which each target user has the use authority in the remote description file, the detection result is that the detection is passed; if the two are not consistent, the detection result is that the detection is failed.

According to the technical scheme, the remote description file corresponding to the local description file is acquired from the authority server based on the authority detection hook file, the use authority of each configured target user to each project folder is detected based on the remote description file and the local description file, the folder use authority is detected through the description file, the use authority detection efficiency is further improved, and the project development efficiency is improved.

EXAMPLE III

Fig. 3 is a schematic flowchart of a method for detecting file folder permissions according to a third embodiment of the present invention, where this embodiment optionally detects, based on the foregoing embodiments, usage permissions of each configured target user on each item file folder by using a remote description file and a local description file, and includes: if the file updating time of the remote description file is later than that of the local description file, detecting the use permission of each configured target user to each project folder based on the remote description file; and if the use authority of each target user recorded by the remote description file to each project folder is consistent with the configured use authority of each target user to each project folder, determining that the detection result of the detection of the configured use authority of each target user to each project folder is detected to be passed.

Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 3, the method for detecting the folder right provided by this embodiment includes the following steps:

s310, loading a project engineering program set of the target engine and a pre-constructed authority detection hook file in the starting process of the editor of the target engine.

The project engineering assembly comprises the use permission of each target user to each project folder configured based on the local description file.

And S320, acquiring a remote description file corresponding to the local description file from the right server based on the right detection hook file.

S330, if the file updating time of the remote description file is later than that of the local description file, detecting the use permission of each configured target user to each project folder based on the remote description file.

In this embodiment, if the file update time of the remote description file is later than the file update time of the local description file, for example, if the remote description file is modified, the usage permission of each configured target user for each project folder may be detected according to the remote description file. Specifically, it may be verified whether the configured usage right of each target user to each project folder is accurate according to the configuration information described in the remote description file.

Of course, if the file time of the remote description file is not later than the file update time of the local description file, it may be directly determined that the detection result is detected to be passed.

S340, if the usage right of each project folder recorded by the remote description file by each target user is consistent with the configured usage right of each project folder by each target user, determining that the detection result of the configured usage right of each project folder by each target user is detected as passed.

Specifically, if the usage right of each item folder by each target user described in the remote description file is completely consistent with the configured usage right of each item folder by each target user, the usage right of each item folder by each target user configured by the target engine is correct, and the detection result is determined to be passed.

And S350, determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

In an alternative embodiment, determining whether to continue executing the operation of opening the editor of the target engine based on the detection result includes: and if the use permission of each target user recorded by the remote description file to each project folder is inconsistent with the configured use permission of each target user to each project folder, calling a permission updating class in the permission detection hook file, updating the configured use permission of each target user to each project folder based on the remote description file, or generating permission prompt information and displaying the permission prompt information.

The permission updating class may be a file class written in the permission detection hook file in advance for updating the configured usage permission of each target user for each item folder. In particular, the permission update class may contain program code that calls a usage permission update method. For example, the C # rights update class PEAssetsUpdater may be written within the EnginePreEntryH ook project.

In this optional embodiment, when the usage right of each target user to each item folder recorded in the remote description file is inconsistent with the configured usage right of each target user to each item folder, the right update class may be invoked, and the configured usage right of each target user to each item folder may be updated according to the remote description file. Or when the use authority of each target user recorded by the remote description file to each project folder is inconsistent with the configured use authority of each target user to each project folder, generating authority prompt information and displaying the authority prompt information; so as to prompt each target user configured by the user that the use authority of each project folder is wrong.

According to the technical scheme of the embodiment, when the file updating time of the remote description file is later than that of the local description file, the use permission of each configured target user to each project folder is detected according to the remote description file, when the use permission of each target user recorded by the remote description file to each project folder is detected to be consistent with the use permission of each configured target user to each project folder, the detection result is determined to be detected to be passed, the use permission is detected through the file updating time first, and when the file updating time is not satisfactory, the configured use permissions are continuously detected one by one, so that the use permission detection efficiency is improved, and meanwhile, the use permission detection accuracy is ensured.

Example four

Fig. 4 is a schematic structural diagram of an apparatus for detecting folder permissions according to a fourth embodiment of the present invention, where this embodiment is applicable to a situation where, in a process of starting an editor of an engine, usage permissions of each item folder by each configured user are detected, and the apparatus specifically includes: a hook file loading module 410, a permission detection module 420 and an open operation execution module 430.

The hook file loading module 410 is configured to load a project engineering assembly and an authority detection hook file of a target engine in a starting process of an editor of the target engine, where the project engineering assembly includes usage authority of each target user on each project folder configured based on a local description file;

the permission detection module 420 is configured to detect, based on the permission detection hook file, usage permission of each configured target user to each project folder;

and an opening operation executing module 430 for determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

Optionally, the authority detection module 420 includes a file obtaining unit and a file comparing unit, where the file obtaining unit is configured to obtain, from an authority server, a remote description file corresponding to the local description file based on the authority detection hook file; and the file comparison unit is used for detecting the use permission of each configured target user to each project folder based on the remote description file and the local description file.

Optionally, the file obtaining unit is specifically configured to:

and acquiring a description file which is consistent with the version information of the local description file or has version information higher than that of the local description file from at least one description file of the use authority of each target user to each project folder stored by a right server based on the authority detection hook file, wherein the description file is used as a remote description file corresponding to the local description file.

Optionally, the file comparison unit includes a first comparison subunit, and the first comparison subunit is configured to:

if the file updating time of the remote description file is later than that of the local description file, detecting the use permission of each configured target user to each project folder based on the remote description file;

and if the usage right of each target user to each project folder recorded by the remote description file is consistent with the configured usage right of each target user to each project folder, determining the detection result of the configured usage right of each target user to each project folder as detected passing.

Optionally, the opening operation execution module 430 includes an authority updating execution unit, where the authority updating execution unit is configured to, if the usage authority of each item folder recorded by the remote description file by each target user is inconsistent with the configured usage authority of each item folder by each target user, invoke an authority updating class in the authority detection hook file, update the configured usage authority of each item folder by each target user based on the remote description file, or generate authority prompt information, and display the authority prompt information.

Optionally, the file comparison unit includes a second comparison subunit, and the second comparison subunit is configured to: and if the file updating time of the remote description file is earlier than that of the local description file, determining that the detection result of the detection of the use permission of each configured target user to each project folder is passed.

Optionally, the opening operation executing module 430 includes a continuous opening executing unit, and the continuous opening executing unit is configured to continue to execute the operation of opening the editor of the target engine if the detection result is that the detection is passed.

In the embodiment, a pre-constructed authority detection hook file and a project engineering program set of a target engine are loaded in the starting process of an editor of the target engine through a hook file loading module, the use authority of each project folder of each target user configured in the project engineering program set is detected based on the authority detection hook file through an authority detection module, and then whether the operation of starting the editor of the target engine is continuously executed or not is determined according to the detection result through starting an operation execution module, so that the automatic detection of the use authority of the folder in the starting process of the editor is realized, the use authority with wrong configuration can be timely found in the starting process of the editor, the timely verification of the use authority of the folder is further realized, and the problems that the file cannot be stored and the file is edited again caused by wrong authority configuration are avoided, the development efficiency and the development experience of the project are improved.

The device for detecting the folder right provided by the embodiment of the invention can execute the method for detecting the folder right provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.

It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.

EXAMPLE five

Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention. The device 12 is typically an electronic device that assumes the function of detecting the configured folder usage right when the engine editor is started.

As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).

Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

Electronic device 12 typically includes a variety of computer-readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.

Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, the storage device 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product 40, with program product 40 having a set of program modules 42 configured to carry out the functions of embodiments of the invention. Program product 40 may be stored, for example, in memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.

Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.

The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, for example, implementing the folder right detection method provided by the above embodiment of the present invention, including:

loading a project engineering program set of a target engine and a pre-constructed authority detection hook file in the starting process of an editor of the target engine, wherein the project engineering program set comprises the use authority of each target user configured based on a local description file to each project folder;

detecting the use permission of each configured target user to each project folder based on the permission detection hook file;

and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

EXAMPLE six

The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method steps for detecting the folder right according to any embodiment of the present invention, where the method includes:

loading a project engineering program set of a target engine and a pre-constructed authority detection hook file in the starting process of an editor of the target engine, wherein the project engineering program set comprises the use authority of each target user configured based on a local description file to each project folder;

detecting the use permission of each configured target user to each project folder based on the permission detection hook file;

and determining whether to continue to execute the operation of opening the editor of the target engine based on the detection result.

Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种针对敏感数据的脱敏处理方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类