qor / roles

Roles is an authorization library for Golang
MIT License
146 stars 35 forks source link

New role, new permissions #2

Closed fungl164 closed 7 years ago

fungl164 commented 8 years ago

Hi,

Given that new role instances can be created, should role.newPermissions() be made public?

This would much less cumbersome and less error-prone than constructing a new Permission manually or calling roles.NewPermission() and ensuring the appropriate role instance is captured....

Many Thnxs!

jinzhu commented 7 years ago

I think it is not necessary to constructing a new Permission manually? just use Allow, Deny?