HasSuperPermission returns true if user owns super permission.
()
| 166 | |
| 167 | // HasSuperPermission returns true if user owns super permission. |
| 168 | func (up *UserPermission) HasSuperPermission() bool { |
| 169 | if up == nil { |
| 170 | return false |
| 171 | } |
| 172 | return up.Role&Super != 0 |
| 173 | } |
| 174 | |
| 175 | // IsValid returns whether the permission object is valid or not. |
| 176 | func (up *UserPermission) IsValid() bool { |
no outgoing calls