first commit
This commit is contained in:
18
models/rights.go
Normal file
18
models/rights.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
type Rights string
|
||||
|
||||
const (
|
||||
Read Rights = "R"
|
||||
Write Rights = "W"
|
||||
ReadWrite Rights = "RW"
|
||||
)
|
||||
|
||||
func (r *Rights) GetRights() Rights {
|
||||
if r == nil {
|
||||
return ReadWrite
|
||||
} else if *r == "" {
|
||||
return ReadWrite
|
||||
}
|
||||
return *r
|
||||
}
|
Reference in New Issue
Block a user