| | |
| | | import javax.swing.JTextField;
|
| | | import javax.swing.KeyStroke;
|
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.Constants.AuthorizationControl;
|
| | | import com.gitblit.Constants.RegistrantType;
|
| | | import com.gitblit.Keys;
|
| | | import com.gitblit.models.RegistrantAccessPermission;
|
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.models.ServerSettings;
|
| | |
| | | postReceivePalette = new JPalette<String>(true);
|
| | | postReceiveInherited = new JLabel();
|
| | | JPanel postReceivePanel = new JPanel(new BorderLayout(5, 5));
|
| | | postReceivePanel.add(postReceivePalette, BorderLayout.CENTER); |
| | | postReceivePanel.add(postReceivePalette, BorderLayout.CENTER);
|
| | | postReceivePanel.add(postReceiveInherited, BorderLayout.WEST);
|
| | |
|
| | | JTabbedPane panel = new JTabbedPane(JTabbedPane.TOP);
|
| | |
| | | List<String> list = new ArrayList<String>();
|
| | | // repositories
|
| | | list.add(".*");
|
| | | // all repositories excluding personal repositories
|
| | | list.add("[^~].*");
|
| | |
|
| | | String prefix;
|
| | | if (settings.hasKey(Keys.git.userRepositoryPrefix)) {
|
| | | prefix = settings.get(Keys.git.userRepositoryPrefix).currentValue;
|
| | | if (StringUtils.isEmpty(prefix)) {
|
| | | prefix = Constants.DEFAULT_USER_REPOSITORY_PREFIX;
|
| | | }
|
| | | } else {
|
| | | prefix = Constants.DEFAULT_USER_REPOSITORY_PREFIX;
|
| | | }
|
| | |
|
| | | if (prefix.length() == 1) {
|
| | | // all repositories excluding personal repositories
|
| | | list.add("[^" + prefix + "].*");
|
| | | }
|
| | | |
| | | String lastProject = null;
|
| | | for (String repo : restricted) {
|
| | | String projectPath = StringUtils.getFirstPathElement(repo);
|