Update scope usage and add Changes for lightweight accounts
This commit is contained in:
@@ -92,7 +92,7 @@ func (m accountResolver) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
m.logger.Debug().Interface("claims", claims).Interface("user", u).Msgf("associated claims with uuid")
|
||||
}
|
||||
|
||||
s, err := scope.GetOwnerScope()
|
||||
s, err := scope.AddOwnerScope(nil)
|
||||
if err != nil {
|
||||
m.logger.Error().Err(err).Msgf("could not get owner scope")
|
||||
return
|
||||
|
||||
@@ -53,9 +53,12 @@ func (c *cs3backend) GetUserByClaims(ctx context.Context, claim, value string, w
|
||||
return user, nil
|
||||
}
|
||||
|
||||
roleIDs, err := loadRolesIDs(ctx, user.Id.OpaqueId, c.settingsRoleService)
|
||||
if err != nil {
|
||||
c.logger.Error().Err(err).Msg("Could not load roles")
|
||||
var roleIDs []string
|
||||
if user.Id.Type != cs3.UserType_USER_TYPE_LIGHTWEIGHT {
|
||||
roleIDs, err = loadRolesIDs(ctx, user.Id.OpaqueId, c.settingsRoleService)
|
||||
if err != nil {
|
||||
c.logger.Error().Err(err).Msgf("Could not load roles")
|
||||
}
|
||||
}
|
||||
|
||||
if len(roleIDs) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user