| | |
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.panels.AccessPolicyPanel;
|
| | | import com.gitblit.wicket.panels.BasePanel.JavascriptEventConfirmation;
|
| | | import com.gitblit.wicket.panels.BulletListPanel;
|
| | | import com.gitblit.wicket.panels.BooleanOption;
|
| | | import com.gitblit.wicket.panels.BulletListPanel;
|
| | | import com.gitblit.wicket.panels.ChoiceOption;
|
| | | import com.gitblit.wicket.panels.RegistrantPermissionsPanel;
|
| | | import com.gitblit.wicket.panels.RepositoryNamePanel;
|
| | |
| | |
|
| | | // owners palette
|
| | | List<UserChoice> owners = new ArrayList<UserChoice>();
|
| | | List<UserChoice> persons = new ArrayList<UserChoice>();
|
| | | for (String owner : repositoryModel.owners) {
|
| | | UserModel o = app().users().getUserModel(owner);
|
| | | if (o != null) {
|
| | | owners.add(new UserChoice(o.getDisplayName(), o.username, o.emailAddress));
|
| | | } else {
|
| | | owners.add(new UserChoice(owner));
|
| | | UserChoice userChoice = new UserChoice(owner);
|
| | | owners.add(userChoice);
|
| | | persons.add(userChoice);
|
| | | }
|
| | | }
|
| | | List<UserChoice> persons = new ArrayList<UserChoice>();
|
| | |
|
| | | for (String person : app().users().getAllUsernames()) {
|
| | | UserModel o = app().users().getUserModel(person);
|
| | | if (o != null) {
|
| | |
| | | }
|
| | | } catch (GitBlitException e) {
|
| | | error(e.getMessage());
|
| | | namePanel.resetModel(repositoryModel);
|
| | | return;
|
| | | }
|
| | | setRedirect(false);
|
| | |
| | | RepositoryModel latestModel = app().repositories().getRepositoryModel(repositoryModel.name);
|
| | | boolean canDelete = app().repositories().canDelete(latestModel);
|
| | | if (canDelete) {
|
| | | if (app().repositories().deleteRepositoryModel(latestModel)) {
|
| | | if (app().gitblit().deleteRepositoryModel(latestModel)) {
|
| | | info(MessageFormat.format(getString("gb.repositoryDeleted"), latestModel));
|
| | | if (latestModel.isPersonalRepository()) {
|
| | | // redirect to user's profile page
|