Преглед на файлове

New forks shall respect the source repository access restriction

If the source repository access restriction exceeds the fork default (push)
then the fork shall inherit the source repository access restriction.
tags/v1.6.1
James Moger преди 9 години
родител
ревизия
a08e6f9586
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7
    0
      src/main/java/com/gitblit/manager/GitblitManager.java

+ 7
- 0
src/main/java/com/gitblit/manager/GitblitManager.java Целия файл

@@ -216,6 +216,13 @@ public class GitblitManager implements IGitblit {
RepositoryModel cloneModel = repository.cloneAs(cloneName);
// owner has REWIND/RW+ permissions
cloneModel.addOwner(user.username);

// ensure initial access restriction of the fork
// is not lower than the source repository (issue-495/ticket-167)
if (repository.accessRestriction.exceeds(cloneModel.accessRestriction)) {
cloneModel.accessRestriction = repository.accessRestriction;
}

repositoryManager.updateRepositoryModel(cloneName, cloneModel, false);

// add the owner of the source repository to the clone's access list

Loading…
Отказ
Запис