source: josm/trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java

Last change on this file was 17972, checked in by Don-vip, 3 years ago

fix #21065 - update fully automatic OAuth authentication to adapt to recent OSM server changes

  • Property svn:eol-style set to native
File size: 4.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.oauth;
3
4/**
5 * List of permissions granted to the current OSM connection.
6 * @since 2747
7 */
8public class OsmPrivileges {
9 private boolean allowWriteApi;
10 private boolean allowWriteGpx;
11 private boolean allowReadGpx;
12 private boolean allowReadPrefs;
13 private boolean allowWritePrefs;
14 private boolean allowModifyNotes;
15 private boolean allowWriteDiary;
16
17 /**
18 * Determines if the client is allowed to modify the map.
19 * @return {@code true} if the client is allowed to modify the map, {@code false} otherwise
20 */
21 public boolean isAllowWriteApi() {
22 return allowWriteApi;
23 }
24
25 /**
26 * Sets whether the client is allowed to modify the map.
27 * @param allowWriteApi {@code true} if the client is allowed to modify the map, {@code false} otherwise
28 */
29 public void setAllowWriteApi(boolean allowWriteApi) {
30 this.allowWriteApi = allowWriteApi;
31 }
32
33 /**
34 * Determines if the client is allowed to upload GPS traces.
35 * @return {@code true} if the client is allowed to upload GPS traces, {@code false} otherwise
36 */
37 public boolean isAllowWriteGpx() {
38 return allowWriteGpx;
39 }
40
41 /**
42 * Sets whether the client is allowed to upload GPS traces.
43 * @param allowWriteGpx {@code true} if the client is allowed to upload GPS traces, {@code false} otherwise
44 */
45 public void setAllowWriteGpx(boolean allowWriteGpx) {
46 this.allowWriteGpx = allowWriteGpx;
47 }
48
49 /**
50 * Determines if the client is allowed to read private GPS traces.
51 * @return {@code true} if the client is allowed to read private GPS traces, {@code false} otherwise
52 */
53 public boolean isAllowReadGpx() {
54 return allowReadGpx;
55 }
56
57 /**
58 * Sets whether the client is allowed to read private GPS traces.
59 * @param allowReadGpx {@code true} if the client is allowed to read private GPS traces, {@code false} otherwise
60 */
61 public void setAllowReadGpx(boolean allowReadGpx) {
62 this.allowReadGpx = allowReadGpx;
63 }
64
65 /**
66 * Determines if the client is allowed to read user preferences.
67 * @return {@code true} if the client is allowed to read user preferences, {@code false} otherwise
68 */
69 public boolean isAllowReadPrefs() {
70 return allowReadPrefs;
71 }
72
73 /**
74 * Sets whether the client is allowed to read user preferences.
75 * @param allowReadPrefs {@code true} if the client is allowed to read user preferences, {@code false} otherwise
76 */
77 public void setAllowReadPrefs(boolean allowReadPrefs) {
78 this.allowReadPrefs = allowReadPrefs;
79 }
80
81 /**
82 * Determines if the client is allowed to modify user preferences.
83 * @return {@code true} if the client is allowed to modify user preferences, {@code false} otherwise
84 */
85 public boolean isAllowWritePrefs() {
86 return allowWritePrefs;
87 }
88
89 /**
90 * Sets whether the client is allowed to modify user preferences.
91 * @param allowWritePrefs {@code true} if the client is allowed to modify user preferences, {@code false} otherwise
92 */
93 public void setAllowWritePrefs(boolean allowWritePrefs) {
94 this.allowWritePrefs = allowWritePrefs;
95 }
96
97 /**
98 * Determines if the client is allowed to modify notes.
99 * @return {@code true} if the client is allowed to modify notes, {@code false} otherwise
100 */
101 public boolean isAllowModifyNotes() {
102 return allowModifyNotes;
103 }
104
105 /**
106 * Sets whether the client is allowed to modify notes.
107 * @param allowModifyNotes {@code true} if the client is allowed to modify notes, {@code false} otherwise
108 */
109 public void setAllowModifyNotes(boolean allowModifyNotes) {
110 this.allowModifyNotes = allowModifyNotes;
111 }
112
113 /**
114 * Determines if the client is allowed to write diary.
115 * @return {@code true} if the client is allowed to write diary, {@code false} otherwise
116 * @since 17972
117 */
118 public boolean isAllowWriteDiary() {
119 return allowWriteDiary;
120 }
121
122 /**
123 * Sets whether the client is allowed to write diary.
124 * @param allowWriteDiary {@code true} if the client is allowed to write diary, {@code false} otherwise
125 * @since 17972
126 */
127 public void setAllowWriteDiary(boolean allowWriteDiary) {
128 this.allowWriteDiary = allowWriteDiary;
129 }
130}
Note: See TracBrowser for help on using the repository browser.