I was properly installed Portus and Registry. But I can't delete the pushed repository and one of its tags, after that, I was accessing the registry logs, it reports an error insufficient scope. I have audited the Portus source code, but I can't figure out what the problem caused.
Here's my compose file

It works properly

Response from https://registry.docker.local:5002/v2/token?account=portus&scope=repository%3Amariadb%3Aall&service=registry.docker.local%3A5000


Response from https://registry.docker.local:5002/v2/token?account=portus&scope=repository%3Amariadb%3Adelete&service=registry.docker.local%3A5000


Here's HTTP handler shown in app/controllers/api/v2/tokens_controller.rb

and related policy shown in app/policies/namespace_policy.rb

The key to the problem is policy delete? is an alias to all? and It will work properly when I request all action. But, when I request delete action, It responded I an empty access list. I think some magic procedure performed here, but I can't find it.