Changeset 6066 in josm


Ignore:
Timestamp:
2013-07-16T17:59:27+02:00 (11 years ago)
Author:
stoecker
Message:

see #8875 - more oauth rights

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java

    r3083 r6066  
    88    private boolean allowReadPrefs;
    99    private boolean allowWritePrefs;
     10    private boolean allowModifyNotes;
    1011
    1112    public boolean isAllowWriteApi() {
     
    3940        this.allowWritePrefs = allowWritePrefs;
    4041    }
     42
     43    public boolean isAllowModifyNotes() {
     44        return allowModifyNotes;
     45    }
     46
     47    public void setAllowModifyNotes(boolean allowModifyNotes) {
     48        this.allowModifyNotes = allowModifyNotes;
     49    }
    4150}
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r5874 r6066  
    468468            parameters.put("allow_read_prefs", "yes");
    469469        }
     470        if(privileges.isAllowModifyNotes()) {
     471            parameters.put("allow_write_notes", "yes");
     472        }
    470473
    471474        parameters.put("commit", "Save changes");
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java

    r3530 r6066  
    2222    private JCheckBox cbWritePrefs;
    2323    private JCheckBox cbReadPrefs;
     24    private JCheckBox cbModifyNotes;
    2425
    2526    protected void build() {
     
    7172        cbWritePrefs.setSelected(true);
    7273
     74        gc.gridy = 5;
     75        add(cbModifyNotes = new JCheckBox(), gc);
     76        cbModifyNotes.setText(tr("Allow modifications of notes"));
     77        cbModifyNotes.setToolTipText(tr("Select to grant JOSM the right to modify notes on your behalf"));
     78        cbModifyNotes.setSelected(true);
     79
    7380        // filler - grab remaining space
    74         gc.gridy = 5;
     81        gc.gridy = 6;
    7582        gc.fill = GridBagConstraints.BOTH;
    7683        gc.weightx = 1.0;
     
    95102        privileges.setAllowWritePrefs(cbWritePrefs.isSelected());
    96103        privileges.setAllowReadPrefs(cbReadPrefs.isSelected());
     104        privileges.setAllowModifyNotes(cbModifyNotes.isSelected());
    97105        return privileges;
    98106    }
Note: See TracChangeset for help on using the changeset viewer.