# User "Remove" Permissions for Task

**URL:** <https://kanboard.discourse.group/t/user-remove-permissions-for-task/47>\
**Category:** Open Discussions\
**Created:** [November 27, 2018, 11:45pm UTC](https://kanboard.discourse.group/t/user-remove-permissions-for-task/47 "2018-11-27T23:45:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![orware](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/orware/32/21_2.png) [@orware](https://kanboard.discourse.group/u/orware)\
**Post date:** [November 27, 2018, 11:45pm UTC](https://kanboard.discourse.group/t/user-remove-permissions-for-task/47/1 "2018-11-27T23:45:04Z")

</div>

Is there anyway to currently prevent a user from having the remove permissions for their own tasks?

It wasn’t something that had come up as a requirement until today but the need has come up to potentially prevent users from being able to remove tasks from the board. We tested with a user that has “Project Member” permissions for the project and that user couldn’t Remove a task I had created but they could Remove one they had created and this is the scenario the department would like to prevent.

It wouldn’t be as much of an issue if the Remove action led to a soft delete, but it currently leads to a hard delete so once it’s gone, the record is removed from the database and the concern here is that one of the staff members on the team might remove their own records they create in the future and impact their teammates negatively that way by removing important / useful information that’s been recorded in Kanboard.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 28, 2018, 1:12am UTC](https://kanboard.discourse.group/t/user-remove-permissions-for-task/47/2 "2018-11-28T01:12:12Z")

</div>

@orware

Out of the box, no.

But…you could make a plugin that would block the TaskSuppressionController from being accessed by anyone below Project Managers, or admin, or whatever you want.

So, The answer is yes, you can.

All you need to do is add:  
`$this->projectAccessMap->add('TaskSuppressionController', 'remove', Role::PROJECT_MANAGER);`  
to the initialize() method in your Plugin.php, with correct `use`'s.

This would Block access to the remove method in that controller. It would however not remove the link to “remove” in the dropdown, but if they tried to “remove” it would spin and spin until they hit cancel. You could override the template for the dropdowns and conditionally hide the option to remove as well, but not worth the time in my opinion, because, regardless, they won’t be able to remove anything.

If you can’t figure that out, let me know, I could probably write that in 5mins for you.

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 28, 2018, 1:38am UTC](https://kanboard.discourse.group/t/user-remove-permissions-for-task/47/3 "2018-11-28T01:38:10Z")

</div>

@orware

> **[creecros/removeblock](https://github.com/creecros/removeblock)**
>
> Blocks normal kanboard users from removing tasks. Contribute to creecros/removeblock development by creating an account on GitHub.

Like this.

---

<div class="post-metadata">

**Author:** ![orware](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/orware/32/21_2.png) [@orware](https://kanboard.discourse.group/u/orware)\
**Post date:** [November 28, 2018, 4:17pm UTC](https://kanboard.discourse.group/t/user-remove-permissions-for-task/47/4 "2018-11-28T16:17:48Z")

</div>

Thanks @creecros. The only part there that sounds a little bit bad from the user perspective is how the option will still be displayed to the regular Project Users but at least it handles the requirement :-).

Thank you, I’ll give the plugin you created a try today!

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [November 28, 2018, 4:30pm UTC](https://kanboard.discourse.group/t/user-remove-permissions-for-task/47/5 "2018-11-28T16:30:38Z")

</div>

@orware

It would be just as easy to also hide the option from them. My aim was to give you the bricks, not to build the whole wall. 😉

However, if you desire that, and can’t figure out the rest, I would be happy to help. 👅

Here is another brick for you:

> [@Feature request: option to disable swimlane features](https://kanboard.discourse.group/t/feature-request-option-to-disable-swimlane-features/49/5):
>
> @milk Here is a simple example for you, as a plugin. Put the toggle switch in “Settings\>Board Settings”, once active it will remove the Second set of parentheses in the column header referring to the total task count in all swimlanes, if 1 swimlane is being used. The added condition in the template is $swimlane['nb\_swimlanes'] \> 1, if there were more things you wanted to hide, you would do the same. Hope that helps.
