IsValid returns whether the permission object is valid or not.
()
| 174 | |
| 175 | // IsValid returns whether the permission object is valid or not. |
| 176 | func (up *UserPermission) IsValid() bool { |
| 177 | return up != nil && (up.Role >= Void && up.Role < Invalid) |
| 178 | } |
| 179 | |
| 180 | // HasDisallowedQueryPatterns returns whether the queries are permitted. |
| 181 | func (up *UserPermission) HasDisallowedQueryPatterns(queries []Query) (query string, status bool) { |
no outgoing calls