api/models/rights.go

12 lines
229 B
Go
Raw Normal View History

package models
2018-07-10 12:02:23 +00:00
// Rights defines rights methods
type Rights interface {
IsAdmin(*User) bool
CanWrite(*User) bool
CanRead(*User) bool
2018-07-12 21:33:21 +00:00
CanDelete(*User, int64) bool
2018-07-12 21:07:03 +00:00
CanUpdate(*User, int64) bool
2018-07-12 21:16:32 +00:00
CanCreate(*User, int64) bool
}