forked from forgejo/forgejo
[API] Add endpount to get user org permissions (#17232)
* Add endpoint * Add swagger response + generate swagger * Stop execution if user / org is not found * Add tests Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
7b8723158e
commit
d0a681fbc3
7 changed files with 325 additions and 1 deletions
|
@ -17,6 +17,15 @@ type Organization struct {
|
|||
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
|
||||
}
|
||||
|
||||
// OrganizationPermissions list differents users permissions on an organization
|
||||
type OrganizationPermissions struct {
|
||||
IsOwner bool `json:"is_owner"`
|
||||
IsAdmin bool `json:"is_admin"`
|
||||
CanWrite bool `json:"can_write"`
|
||||
CanRead bool `json:"can_read"`
|
||||
CanCreateRepository bool `json:"can_create_repository"`
|
||||
}
|
||||
|
||||
// CreateOrgOption options for creating an organization
|
||||
type CreateOrgOption struct {
|
||||
// required: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue