Merge "Only show the 'Edit Config' button if refs/meta/config is visible"
This commit is contained in:
		@@ -19,6 +19,7 @@ import com.google.gwt.core.client.JavaScriptObject;
 | 
			
		||||
public class ProjectAccessInfo extends JavaScriptObject {
 | 
			
		||||
  public final native boolean canAddRefs() /*-{ return this.can_add ? true : false; }-*/;
 | 
			
		||||
  public final native boolean isOwner() /*-{ return this.is_owner ? true : false; }-*/;
 | 
			
		||||
  public final native boolean configVisible() /*-{ return this.config_visible ? true : false; }-*/;
 | 
			
		||||
 | 
			
		||||
  protected ProjectAccessInfo() {
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -72,6 +72,7 @@ import java.util.Map.Entry;
 | 
			
		||||
 | 
			
		||||
public class ProjectInfoScreen extends ProjectScreen {
 | 
			
		||||
  private boolean isOwner;
 | 
			
		||||
  private boolean configVisible;
 | 
			
		||||
 | 
			
		||||
  private LabeledWidgetsGrid grid;
 | 
			
		||||
  private Panel pluginOptionsPanel;
 | 
			
		||||
@@ -154,6 +155,7 @@ public class ProjectInfoScreen extends ProjectScreen {
 | 
			
		||||
          @Override
 | 
			
		||||
          public void onSuccess(ProjectAccessInfo result) {
 | 
			
		||||
            isOwner = result.isOwner();
 | 
			
		||||
            configVisible = result.configVisible();
 | 
			
		||||
            enableForm();
 | 
			
		||||
            saveProject.setVisible(isOwner);
 | 
			
		||||
          }
 | 
			
		||||
@@ -625,7 +627,7 @@ public class ProjectInfoScreen extends ProjectScreen {
 | 
			
		||||
      actionsPanel.add(createChangeAction());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (isOwner) {
 | 
			
		||||
    if (isOwner && configVisible) {
 | 
			
		||||
      actionsPanel.add(createEditConfigAction());
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user