File tree 2 files changed +7
-0
lines changed 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1014,6 +1014,7 @@ settings.transfer_succeed = The repository has been transferred.
1014
1014
settings.confirm_delete = Delete Repository
1015
1015
settings.add_collaborator = Add Collaborator
1016
1016
settings.add_collaborator_success = The collaborator has been added.
1017
+ settings.add_collaborator_inactive_user = Cannot add an inactive user as a collaborator.
1017
1018
settings.delete_collaborator = Remove
1018
1019
settings.collaborator_deletion = Remove Collaborator
1019
1020
settings.collaborator_deletion_desc = Removing a collaborator will revoke their access to this repository. Continue?
Original file line number Diff line number Diff line change @@ -381,6 +381,12 @@ func CollaborationPost(ctx *context.Context) {
381
381
return
382
382
}
383
383
384
+ if ! u .IsActive {
385
+ ctx .Flash .Error ("cannot add an inactive user as a collaborator" )
386
+ ctx .Redirect (setting .AppSubURL + ctx .Req .URL .Path )
387
+ return
388
+ }
389
+
384
390
// Organization is not allowed to be added as a collaborator.
385
391
if u .IsOrganization () {
386
392
ctx .Flash .Error (ctx .Tr ("repo.settings.org_not_allowed_to_be_collaborator" ))
You can’t perform that action at this time.
0 commit comments