Package com.gitblit.Constants

Examples of com.gitblit.Constants.AccessRestrictionType


    namePanel = new RepositoryNamePanel("namePanel", repositoryModel);
    form.add(namePanel);

    // prepare the default access controls
    AccessRestrictionType defaultRestriction = AccessRestrictionType.fromName(
        app().settings().getString(Keys.git.defaultAccessRestriction, AccessRestrictionType.PUSH.name()));
    if (AccessRestrictionType.NONE == defaultRestriction) {
      defaultRestriction = AccessRestrictionType.PUSH;
    }
    AuthorizationControl defaultControl = AuthorizationControl.fromName(
View Full Code Here


    policies.add(authenticatedPushPolicy);
    policies.add(namedPushPolicy);
    policies.add(clonePolicy);
    policies.add(viewPolicy);

    AccessRestrictionType defaultRestriction = repository.accessRestriction;
    if (defaultRestriction == null) {
      defaultRestriction = AccessRestrictionType.fromName(app().settings().getString(Keys.git.defaultAccessRestriction,
          AccessRestrictionType.PUSH.name()));
    }
View Full Code Here

    accessRestriction.setSelectedItem(anRepository.accessRestriction);
    accessRestriction.addItemListener(new ItemListener() {
      @Override
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.SELECTED) {
          AccessRestrictionType art = (AccessRestrictionType) accessRestriction.getSelectedItem();
          EditRepositoryDialog.this.setupAccessPermissions(art);
        }
      }
    });
View Full Code Here

    public Component getListCellRendererComponent(JList list, Object value,
        int index, boolean isSelected, boolean cellHasFocus) {
      super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);

      if (value instanceof AccessRestrictionType) {
        AccessRestrictionType restriction = (AccessRestrictionType) value;
        switch (restriction) {
        case NONE:
          setText(Translation.get("gb.notRestricted"));
          break;
        case PUSH:
View Full Code Here

TOP

Related Classes of com.gitblit.Constants.AccessRestrictionType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.