📝 Introduction
User Story:
As a User, I want to assign the reosurce ownership to the administrator during the resource creation, by defining the username in the settings file.
Problem Statement:
Not all the plaform wants the user that upload the resource to be the owner of the resource itself, but wants that the administrator will be the only owner of the resources in the platform.
At the moment this is not possible since by default the user creates a resource the data is always the owner of the resource itself.
The idea is to create a system where, by specifing few settings, the system will automatically assing the ownership of the resource to the administrator and assign the "manage" permissions to the user itself.
Ideally will be possible to define the following two settings in the application:
AUTO_ASSIGN_RESOURCE_OWNERSHIP_TO_ADMIN = os.getenv("AUTO_ASSIGN_RESOURCE_OWNERSHIP_TO_ADMIN", "False") # define if the function is enabled
RESOURCE_OWNERSHIP_ADMIN_USERNAME = os.getenv("RESOURCE_OWNERSHIP_ADMIN_USERNAME", "admin") # define the username of the administrator to assing the ownership to
NOTE: The above configuration MUST be value and choerent with all the resource available
✅ Criteria
📝 Introduction
User Story:
As a User, I want to assign the reosurce ownership to the administrator during the resource creation, by defining the username in the settings file.
Problem Statement:
Not all the plaform wants the user that upload the resource to be the owner of the resource itself, but wants that the administrator will be the only owner of the resources in the platform.
At the moment this is not possible since by default the user creates a resource the data is always the owner of the resource itself.
The idea is to create a system where, by specifing few settings, the system will automatically assing the ownership of the resource to the administrator and assign the "manage" permissions to the user itself.
Ideally will be possible to define the following two settings in the application:
NOTE: The above configuration MUST be value and choerent with all the resource available
✅ Criteria
AUTO_ASSIGN_RESOURCE_OWNERSHIP_TO_ADMINis set butRESOURCE_OWNERSHIP_ADMIN_USERNAMEis not, we should log a warning in the settings file (via log) which sayis that the ownership will be provided to the default usernameadminRESOURCE_OWNERSHIP_ADMIN_USERNAMEmust be a superuser. The evaluation of the can be done during the creation. If the user provided is not ad administrator, the system should log an error and assign the resource to the first admin available.RESOURCE_OWNERSHIP_ADMIN_USERNAMEshould be the owner of the resource, while the initial user must have themanagepermissions. If later the permissions are altered via thesharepanel, the new permissions must be set