mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-17 00:13:44 +00:00
feat: project roles (#843)
* fix logging * token verification * feat: assert roles * feat: add project role assertion on project and token type on app * id and access token role assertion * add project role check * user grant required step in login * update library * fix merge * fix merge * fix merge * update oidc library * fix tests * add tests for GrantRequiredStep * add missing field ProjectRoleCheck on project view model * fix project create * fix project create
This commit is contained in:
@@ -69,6 +69,15 @@ func PutApplication(db *gorm.DB, table string, app *model.ApplicationView) error
|
||||
return save(db, app)
|
||||
}
|
||||
|
||||
func PutApplications(db *gorm.DB, table string, apps ...*model.ApplicationView) error {
|
||||
save := repository.PrepareBulkSave(table)
|
||||
s := make([]interface{}, len(apps))
|
||||
for i, app := range apps {
|
||||
s[i] = app
|
||||
}
|
||||
return save(db, s...)
|
||||
}
|
||||
|
||||
func DeleteApplication(db *gorm.DB, table, appID string) error {
|
||||
delete := repository.PrepareDeleteByKey(table, model.ApplicationSearchKey(proj_model.AppSearchKeyAppID), appID)
|
||||
return delete(db)
|
||||
|
||||
Reference in New Issue
Block a user