task_role.go 372 B

1234567891011121314151617181920
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/admin/main/videoup/model/manager"
  5. "go-common/library/log"
  6. )
  7. func (s *Service) isLeader(c context.Context, uid int64) bool {
  8. role, e := s.mng.GetUserRole(c, uid)
  9. if e != nil {
  10. log.Error("s.mng.GetUserRole(%d) error(%v)", uid, e)
  11. return false
  12. }
  13. if role == manager.TaskLeader {
  14. return true
  15. }
  16. return false
  17. }