add isPermissionMethod #8
|
@ -48,9 +48,9 @@ func (s Service) LoginWithEmailAndPassword(email, password string) (model.User,
|
||||||
return user.LoginWithEmailAndPassword(email, password)
|
return user.LoginWithEmailAndPassword(email, password)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPermission ...
|
// HasPermission ...
|
||||||
func (s Service) IsPermission(userID, permission string) bool {
|
func (s Service) HasPermission(userID, permission string) bool {
|
||||||
return user.IsPermission(userID, permission)
|
return user.HasPermission(userID, permission)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -320,8 +320,8 @@ func LoginWithEmailAndPassword(email, password string) (result model.User, err e
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPermission ...
|
// HasPermission ...
|
||||||
func IsPermission(userID, permission string) (result bool) {
|
func HasPermission(userID, permission string) (result bool) {
|
||||||
var (
|
var (
|
||||||
ctx = context.Background()
|
ctx = context.Background()
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue