How to manually remove permission from system

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.7
How are you able to access your server: The webadmin
SSH

Describe your issue

I have a problem migrating the app Gitea to my new server (v11.x to v12.0). I am trying to migrate the app Gitea. I already installed the app before trying to restore it. This is where my problems comes from. Gitea was deinstalled but one of its permission is being kept within Yunohost.

I am trying to restore the Gitea Yunohost backup from my old server. However this does not work due to Permission 'gitea.admin' already exists. It seems this is a problem from the app. As a workaround I want to delete the permission gitea.admin manually but I don’t see a way to do so.

Is there a a way to remove a stale permission from Yunohost? I didn’t see any option using the command yunohost user permission.

Share relevant logs or error messages

https://paste.yunohost.org/raw/waqugijeyo

Try sudo yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('gitea.admin', force=True)"

1 Like

Thank you very much. The command works :slight_smile: !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.