From b2373bbada1dd28e5c239b9721174e43a650a963 Mon Sep 17 00:00:00 2001 From: Hoang Date: Wed, 10 Nov 2021 17:02:16 +0700 Subject: [PATCH] change name to HasPermission --- action.go | 6 +++--- user/handle.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/action.go b/action.go index ca773c8..bba4ad7 100644 --- a/action.go +++ b/action.go @@ -48,9 +48,9 @@ func (s Service) LoginWithEmailAndPassword(email, password string) (model.User, return user.LoginWithEmailAndPassword(email, password) } -// IsPermission ... -func (s Service) IsPermission(userID, permission string) bool { - return user.IsPermission(userID, permission) +// HasPermission ... +func (s Service) HasPermission(userID, permission string) bool { + return user.HasPermission(userID, permission) } // diff --git a/user/handle.go b/user/handle.go index 503689d..96ed3c0 100644 --- a/user/handle.go +++ b/user/handle.go @@ -320,8 +320,8 @@ func LoginWithEmailAndPassword(email, password string) (result model.User, err e return } -// IsPermission ... -func IsPermission(userID, permission string) (result bool) { +// HasPermission ... +func HasPermission(userID, permission string) (result bool) { var ( ctx = context.Background() )