Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Upstream
Gitea
Commits
c1275e2b
Commit
c1275e2b
authored
6 years ago
by
Lanre Adelowo
Committed by
Lauris BH
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Admin should be able to delete repos even if he is not a member of the organization (#5443) (#5447)
parent
7bc1faab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routers/api/v1/repo/repo.go
+1
-1
routers/api/v1/repo/repo.go
with
1 addition
and
1 deletion
+1
-1
routers/api/v1/repo/repo.go
View file @
c1275e2b
...
...
@@ -508,7 +508,7 @@ func Delete(ctx *context.APIContext) {
owner
:=
ctx
.
Repo
.
Owner
repo
:=
ctx
.
Repo
.
Repository
if
owner
.
IsOrganization
()
{
if
owner
.
IsOrganization
()
&&
!
ctx
.
User
.
IsAdmin
{
isOwner
,
err
:=
owner
.
IsOwnedBy
(
ctx
.
User
.
ID
)
if
err
!=
nil
{
ctx
.
Error
(
500
,
"IsOwnedBy"
,
err
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment