Skip to content

Commit

Permalink
Cleaning up a chunk of code, update version to 1.5 (#394)
Browse files Browse the repository at this point in the history
Version updated since we now have BitBucket support #392
  • Loading branch information
zot authored Oct 3, 2022
1 parent 1592a21 commit eee3161
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Registrator"
uuid = "4418983a-e44d-11e8-3aec-9789530b3b3e"
authors = ["Stefan Karpinski <stefan@karpinski.org>"]
version = "1.4.2"
version = "1.5"

[deps]
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
Expand Down
17 changes: 7 additions & 10 deletions src/webui/gitutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,14 @@ function isauthorized(u::User{GitLab.User}, repo::GitLab.Project, fetch = true)
end
# Same as above: group membership then collaborator check.
nspath = split(repo.namespace.full_path, "/")
ismember = @gf_bool @mock is_collaborator(u.forge, repo.namespace.full_path, repo.name, u.user.id)
if !ismember
accns = ""
for ns in nspath
accns = joinpath(accns, ns)
ismember = @gf_bool @mock is_member(forge, accns, u.user.id)
ismember &&
break
end
(@gf_bool @mock is_collaborator(u.forge, repo.namespace.full_path, repo.name, u.user.id)) &&
return AuthSuccess()
accns = ""
for ns in nspath
accns = joinpath(accns, ns)
(@gf_bool @mock is_member(forge, accns, u.user.id)) &&
return AuthSuccess()
end
ismember && return AuthSuccess()
AuthFailure("Project $(repo.name) belongs to the group $(repo.namespace.full_path), and user $(u.user.name) is not a member of that group or its parent group(s)")
end

Expand Down

2 comments on commit eee3161

@nkottary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/69405

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.0 -m "<description of version>" eee3161998dbd8f4ccc8d6703a5292cc5fa52891
git push origin v1.5.0

Please sign in to comment.