Remove the Delete option from templates created by users who have shared with their groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2023 01:26 AM
Hi,
I want users who have created an template only those should be able to delete it. When they share it to any groups or users those users of groups should not be able to delete it.
Any help is appreciated.
Regards,
Xion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2023 02:05 AM
You can accomplish this by implementing a system of permissions and roles for your users. The user who creates the template would be assigned a "creator" role, which would grant them the ability to delete the template. When the template is shared with other groups or users, they would be assigned a "viewer" role, which would not include the ability to delete the template. The specific implementation of this system would depend on the technology stack you are using, but many programming languages and frameworks have built-in support for permissions and roles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2023 05:11 AM
Hi mohammed,
In this case All the users who would create the template would have the creator Role. And one creator would be able to delete other's template if shared with him, Which I actually don't want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2023 08:47 AM
Was this statement ever addressed?
@Xion - I interpret what was said differently. What I understood, the person that creates a specific template would be assigned creator to that specific template and would have complete control over that 1 template, everyone else would be a viewer. The same logic would apply to all the other templates. I didn't understand that once you were a creator, you maintained that permission for all templates?
@kmohammed - can you help clarify?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 02:35 PM
Hi Xion,
Apologies for any confusion caused. I understand your concern regarding multiple users with the "creator" role being able to delete each other's templates. To clarify, my initial suggestion was to assign the "creator" role to the user who creates a specific template, giving them complete control over that particular template. Other users or groups who receive the shared template would have the "viewer" role, which does not include the ability to delete the template.
However, based on your feedback, it seems you would like to restrict the deletion permissions to only the original creator, even if they share the template with other users. In that case, you can implement the revised approach I mentioned earlier:
1. When a user creates a template, assign them as the owner of that template. This ownership information should be stored in your database or template management system.
2. When the template is shared with other users or groups, grant them the "viewer" role for that template. This role will allow them to view and use the template but not delete it.
3. Modify the delete functionality to check if the current user requesting deletion is the owner of the template. If they are, allow the deletion to proceed. If not, display an error message indicating that only the template owner has permission to delete it.
By following this approach, each template will have a single owner who can delete it, regardless of whether it is shared with other users or groups.
I hope this clarifies the solution. If you have any further questions or need assistance with the implementation, please let me know.
Best regards,
kmohammed