Versions in this module Expand all Collapse all v4 v4.0.0 Jan 10, 2023 Changes in this version + type Config struct + AutoLoadPolicySeconds int + type Service interface + AddResourcePermission func(user, resource string, action per.Action) (bool, *gz.ErrMsg) + AddScore func(groupID *string, competition *string, circuit *string, owner *string, ...) *gz.ErrMsg + CanPerformWithRole func(owner *string, user string, role per.Role) (bool, *gz.ErrMsg) + GetOrganization func(username string) (*users.Organization, *gz.ErrMsg) + GetUserFromUsername func(username string) (*users.User, *gz.ErrMsg) + IsAuthorizedForResource func(user, resource string, action per.Action) (bool, *gz.ErrMsg) + IsSystemAdmin func(user string) bool + QueryForResourceVisibility func(q *gorm.DB, owner *string, user *users.User) *gorm.DB + StartAutoLoadPolicy func() + UserFromJWT func(r *http.Request) (*users.User, bool, *gz.ErrMsg) + VerifyOwner func(owner, user string, p per.Action) (bool, *gz.ErrMsg) + func NewService(resourcePermissions *per.Permissions, db *gorm.DB, sysAdmin string) (Service, error) + type UserAccessorDataMock struct + func NewUserAccessorDataMock(ctx context.Context, ua Service, sysadminIdentiy, application string) *UserAccessorDataMock + func (m *UserAccessorDataMock) ReloadEverything(ctx context.Context) *gz.ErrMsg