Mercurial > p > roundup > code
annotate share/roundup/templates/devel/schema.py @ 8264:09e8d1a4c796
docs: clarify wording, fix index, add superseder link
Make superseder, messages etc. properties index entries point to the
right place.
Link to description of using Superseder in the original overview.
fix bad wording on boolean properties.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 08 Jan 2025 11:39:54 -0500 |
| parents | d0460348bf9a |
| children |
| rev | line source |
|---|---|
| 4434 | 1 |
| 2 # | |
| 3 # TRACKER SCHEMA | |
| 4 # | |
| 5 | |
| 6 # Class automatically gets these properties: | |
| 7 # creation = Date() | |
| 8 # activity = Date() | |
| 9 # creator = Link('user') | |
| 10 # actor = Link('user') | |
| 11 | |
| 12 | |
| 13 # This is the repository class, then you can see/edit repositories in pages like | |
| 14 # "http://tracker/url/vcs_repo1" | |
| 15 vcs_repo = Class(db, "vcs_repo", | |
| 16 name=String(), | |
| 17 host=String(), | |
| 18 path=String(), | |
| 19 webview_url=String()) | |
| 20 vcs_repo.setkey('name') | |
| 21 | |
| 22 # Stores revision data, lets you see/edit revisions in pages like | |
| 23 # "http://tracker/url/vcs_rev1". The vcs_rev.item.html template is currently | |
| 24 # broken, but this works fine without it. | |
| 25 vcs_rev = Class(db, "vcs_rev", | |
| 26 repository=Link('vcs_repo'), | |
| 27 revision=String()) | |
| 28 | |
| 29 | |
| 30 # Component | |
| 31 component = Class(db, 'component', | |
| 32 name=String(), | |
| 33 description=String(), | |
| 34 order=Number(), | |
| 35 assign_to=Link('user')) | |
| 36 component.setkey('name') | |
| 37 | |
| 38 # Version | |
| 39 version = Class(db, 'version', | |
| 40 name=String(), | |
| 41 description=String(), | |
| 42 order=Number()) | |
| 43 version.setkey('name') | |
| 44 | |
| 45 # Severity | |
| 46 severity = Class(db, 'severity', | |
| 47 name=String(), | |
| 48 description=String(), | |
| 49 order=Number()) | |
| 50 severity.setkey('name') | |
| 51 | |
| 52 # Priority | |
| 53 priority = Class(db, 'priority', | |
| 54 name=String(), | |
| 55 description=String(), | |
| 56 order=Number()) | |
| 57 priority.setkey('name') | |
| 58 | |
| 59 # Status | |
| 60 status = Class(db, "status", | |
| 61 name=String(), | |
| 62 description=String(), | |
| 63 order=Number()) | |
| 64 status.setkey("name") | |
| 65 | |
| 66 # Resolution | |
| 67 resolution = Class(db, "resolution", | |
| 68 name=String(), | |
| 69 description=String(), | |
| 70 order=Number()) | |
| 71 resolution.setkey('name') | |
| 72 | |
| 73 # Keyword | |
| 74 keyword = Class(db, "keyword", | |
| 75 name=String(), | |
| 76 description=String()) | |
| 77 keyword.setkey("name") | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
78 |
| 4434 | 79 |
| 80 # User-defined saved searches | |
| 81 query = Class(db, "query", | |
| 82 klass=String(), | |
| 83 name=String(), | |
| 84 url=String(), | |
| 85 private_for=Link('user')) | |
| 86 | |
| 87 # add any additional database schema configuration here | |
| 88 | |
| 89 user = Class(db, "user", | |
| 90 username=String(), | |
| 91 password=Password(), | |
| 92 address=String(), | |
| 93 realname=String(), | |
| 94 phone=String(), | |
| 95 organisation=String(), | |
| 96 alternate_addresses=String(), | |
| 97 queries=Multilink('query'), | |
| 98 roles=String(), # comma-separated string of Role names | |
| 99 timezone=String(), | |
| 100 vcs_name=String()) | |
| 101 | |
| 102 user.setkey("username") | |
|
7213
670ab365e76f
Finish adding anyonymous Register role in devel/responsive templates
John Rouillard <rouilj@ieee.org>
parents:
7132
diff
changeset
|
103 db.security.addPermission(name='Register', klass='user', |
|
670ab365e76f
Finish adding anyonymous Register role in devel/responsive templates
John Rouillard <rouilj@ieee.org>
parents:
7132
diff
changeset
|
104 description='User is allowed to register new user') |
| 4434 | 105 |
| 106 # Permissions for revision creation and repository viewing. | |
| 107 for role in ('User',): | |
| 108 db.security.addPermissionToRole(role, 'Create', 'vcs_rev') | |
| 109 db.security.addPermissionToRole(role, 'View', 'vcs_repo') | |
| 110 | |
| 111 # FileClass automatically gets this property in addition to the Class ones: | |
| 112 # content = String() [saved to disk in <tracker home>/db/files/] | |
| 113 # type = String() [MIME type of the content, default 'text/plain'] | |
| 114 msg = FileClass(db, "msg", | |
| 115 author=Link("user", do_journal='no'), | |
| 116 recipients=Multilink("user", do_journal='no'), | |
| 117 date=Date(), | |
| 118 summary=String(), | |
| 119 files=Multilink("file"), | |
| 120 messageid=String(), | |
| 121 inreplyto=String(), | |
| 122 revision=Link("vcs_rev")) | |
| 123 | |
| 124 # File | |
| 125 file = FileClass(db, "file", | |
| 126 name=String(), | |
| 127 description=String(indexme='yes')) | |
| 128 | |
| 129 # Patch | |
|
8232
d0460348bf9a
fix: issue2550924. clean up schema for devel/responsive templates.
John Rouillard <rouilj@ieee.org>
parents:
8231
diff
changeset
|
130 patch = FileClass(db, "patch", |
| 4434 | 131 name=String(), |
| 132 description=String(indexme='yes'), | |
| 133 repository=String(), | |
| 134 revision=String()) | |
| 135 | |
| 136 # Bug Type | |
| 137 bug_type = Class(db, 'bug_type', | |
| 138 name=String(), | |
| 139 description=String(), | |
| 140 order=Number()) | |
| 141 bug_type.setkey('name') | |
| 142 | |
| 143 # IssueClass automatically gets these properties in addition to the Class ones: | |
| 144 # title = String() | |
| 145 # messages = Multilink("msg") | |
| 146 # files = Multilink("file") | |
| 147 # nosy = Multilink("user") | |
| 148 # superseder = Multilink("issue") | |
| 149 bug = IssueClass(db, "bug", | |
| 150 type=Link('bug_type'), | |
| 151 components=Multilink('component'), | |
| 152 versions=Multilink('version'), | |
| 153 severity=Link('severity'), | |
| 154 priority=Link('priority'), | |
| 155 dependencies=Multilink('bug'), | |
| 156 assignee=Link('user'), | |
| 157 status=Link('status'), | |
| 158 resolution=Link('resolution'), | |
| 159 superseder=Link('bug'), | |
|
5049
29bd12331b86
issue2550601: add multilink to patches to the bug issue. The doc string above the definition already included the code.
John Rouillard <rouilj@ieee.org>
parents:
4902
diff
changeset
|
160 keywords=Multilink('keyword'), |
|
8232
d0460348bf9a
fix: issue2550924. clean up schema for devel/responsive templates.
John Rouillard <rouilj@ieee.org>
parents:
8231
diff
changeset
|
161 patches=Multilink('patch')) |
| 4434 | 162 |
| 163 # Task Type | |
| 164 task_type = Class(db, 'task_type', | |
| 165 name=String(), | |
| 166 description=String(), | |
| 167 order=Number()) | |
| 168 task_type.setkey('name') | |
| 169 | |
| 170 # IssueClass automatically gets these properties in addition to the Class ones: | |
| 171 # title = String() | |
| 172 # messages = Multilink("msg") | |
| 173 # files = Multilink("file") | |
| 174 # nosy = Multilink("user") | |
| 175 # superseder = Multilink("issue") | |
| 176 task = IssueClass(db, "task", | |
| 177 type=Link('task_type'), | |
| 178 components=Multilink('component'), | |
| 179 priority=Link('priority'), | |
| 180 dependencies=Multilink('task'), | |
| 181 assignee=Multilink('user'), | |
| 182 status=Link('status'), | |
| 183 resolution=Link('resolution'), | |
| 184 solves=Link('bug')) | |
| 185 | |
| 186 milestone = IssueClass(db, "milestone", | |
| 187 bugs=Multilink("bug"), | |
| 188 tasks=Multilink("task"), | |
| 189 status=Link("status"), | |
| 190 release_date=String()) | |
| 191 | |
| 192 # | |
| 193 # TRACKER SECURITY SETTINGS | |
| 194 # | |
| 195 # See the configuration and customisation document for information | |
| 196 # about security setup. | |
| 197 | |
| 198 db.security.addRole(name='Developer', description='A developer') | |
| 199 db.security.addRole(name='Coordinator', description='A coordinator') | |
| 200 | |
| 201 # | |
| 202 # REGULAR USERS | |
| 203 # | |
| 204 # Give the regular users access to the web and email interface | |
| 205 for r in 'User', 'Developer', 'Coordinator': | |
| 206 db.security.addPermissionToRole(r, 'Web Access') | |
| 207 db.security.addPermissionToRole(r, 'Email Access') | |
|
5879
94a7669677ae
add permissions to control user of rest and xmlrpc API interfaces.
John Rouillard <rouilj@ieee.org>
parents:
5136
diff
changeset
|
208 db.security.addPermissionToRole(r, 'Rest Access') |
|
94a7669677ae
add permissions to control user of rest and xmlrpc API interfaces.
John Rouillard <rouilj@ieee.org>
parents:
5136
diff
changeset
|
209 db.security.addPermissionToRole(r, 'Xmlrpc Access') |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
210 |
|
8232
d0460348bf9a
fix: issue2550924. clean up schema for devel/responsive templates.
John Rouillard <rouilj@ieee.org>
parents:
8231
diff
changeset
|
211 |
| 4434 | 212 ########################## |
| 213 # User permissions | |
| 214 ########################## | |
| 215 | |
| 216 for cl in ('severity', 'component', | |
| 217 'version', 'priority', 'status', 'resolution', | |
| 218 'bug_type', 'bug', 'task_type', 'task', 'milestone', | |
| 219 'keyword', 'file', 'msg'): | |
| 220 db.security.addPermissionToRole('User', 'View', cl) | |
| 221 db.security.addPermissionToRole('Anonymous', 'View', cl) | |
|
4457
89dd446af2a8
Don't allow users to create tasks and milestones.
Stefan Seefeld <stefan@seefeld.name>
parents:
4454
diff
changeset
|
222 |
|
89dd446af2a8
Don't allow users to create tasks and milestones.
Stefan Seefeld <stefan@seefeld.name>
parents:
4454
diff
changeset
|
223 for cl in ('severity', 'component', |
|
89dd446af2a8
Don't allow users to create tasks and milestones.
Stefan Seefeld <stefan@seefeld.name>
parents:
4454
diff
changeset
|
224 'version', 'priority', 'status', 'resolution', |
|
89dd446af2a8
Don't allow users to create tasks and milestones.
Stefan Seefeld <stefan@seefeld.name>
parents:
4454
diff
changeset
|
225 'bug_type', 'bug', 'file', 'msg'): |
| 4434 | 226 db.security.addPermissionToRole('User', 'Create', cl) |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
227 |
| 4434 | 228 |
| 229 def may_edit_file(db, userid, itemid): | |
| 230 return userid == db.file.get(itemid, "creator") | |
| 231 | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
232 |
| 4434 | 233 p = db.security.addPermission(name='Edit', klass='file', check=may_edit_file, |
| 234 description="User is allowed to remove their own files") | |
| 235 db.security.addPermissionToRole('User', p) | |
| 236 | |
| 237 p = db.security.addPermission(name='Create', klass='bug', | |
| 238 properties=('title', 'bug_type', | |
| 239 'components', 'versions', | |
| 240 'severity', | |
| 241 'messages', 'files', 'nosy'), | |
| 242 description='User can report and discuss bugs') | |
| 243 db.security.addPermissionToRole('User', p) | |
| 244 | |
| 245 p = db.security.addPermission(name='Edit', klass='bug', | |
| 246 properties=('title', 'bug_type', | |
| 247 'components', 'versions', | |
| 248 'severity', | |
| 249 'messages', 'files', 'nosy'), | |
| 250 description='User can report and discuss bugs') | |
| 251 db.security.addPermissionToRole('User', p) | |
| 252 | |
| 253 p = db.security.addPermission(name='Create', klass='task', | |
| 254 properties=('title', 'task_type', | |
| 255 'components', | |
| 256 'messages', 'files', 'nosy'), | |
| 257 description='Developer can create and discuss tasks') | |
| 258 db.security.addPermissionToRole('Developer', p) | |
| 259 | |
| 260 p = db.security.addPermission(name='Edit', klass='task', | |
| 261 properties=('title', 'task_type', | |
| 262 'components', | |
| 263 'messages', 'files', 'nosy'), | |
| 264 description='Developer can create and discuss tasks') | |
| 265 db.security.addPermissionToRole('Developer', p) | |
| 266 | |
| 267 p = db.security.addPermission(name='Create', klass='milestone', | |
| 268 description='Coordinator can create and discuss milestones') | |
| 269 db.security.addPermissionToRole('Coordinator', p) | |
| 270 | |
| 271 p = db.security.addPermission(name='Edit', klass='milestone', | |
| 272 description='Coordinator can create and discuss milestones') | |
| 273 db.security.addPermissionToRole('Coordinator', p) | |
| 274 | |
| 275 | |
| 276 ########################## | |
| 277 # Developer permissions | |
| 278 ########################## | |
| 279 for cl in ('bug_type', 'severity', 'component', | |
| 280 'version', 'priority', 'status', 'resolution', | |
| 281 'bug', 'file', 'msg', 'keyword'): | |
| 282 db.security.addPermissionToRole('Developer', 'View', cl) | |
| 283 | |
| 284 for cl in ('bug', 'file', 'msg', 'keyword'): | |
| 285 db.security.addPermissionToRole('Developer', 'Edit', cl) | |
| 286 db.security.addPermissionToRole('Developer', 'Create', cl) | |
| 287 | |
| 288 | |
| 289 ########################## | |
| 290 # Coordinator permissions | |
| 291 ########################## | |
| 292 for cl in ('bug_type', 'task_type', 'severity', 'component', | |
| 293 'version', 'priority', 'status', 'resolution', 'bug', 'task', 'file', 'msg'): | |
| 294 db.security.addPermissionToRole('Coordinator', 'View', cl) | |
| 295 db.security.addPermissionToRole('Coordinator', 'Edit', cl) | |
| 296 db.security.addPermissionToRole('Coordinator', 'Create', cl) | |
| 297 | |
| 298 # May users view other user information? Comment these lines out | |
| 299 # if you don't want them to | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
300 p = db.security.addPermission(name='View', klass='user', |
|
4902
a403c29ffaf9
Security fix default user permissions
Ralf Schlatterbeck <rsc@runtux.com>
parents:
4676
diff
changeset
|
301 properties=('id', 'organisation', 'phone', 'realname', 'timezone', |
|
8232
d0460348bf9a
fix: issue2550924. clean up schema for devel/responsive templates.
John Rouillard <rouilj@ieee.org>
parents:
8231
diff
changeset
|
302 'username', 'vcs_name')) |
|
4902
a403c29ffaf9
Security fix default user permissions
Ralf Schlatterbeck <rsc@runtux.com>
parents:
4676
diff
changeset
|
303 db.security.addPermissionToRole('User', p) |
|
a403c29ffaf9
Security fix default user permissions
Ralf Schlatterbeck <rsc@runtux.com>
parents:
4676
diff
changeset
|
304 db.security.addPermissionToRole('Developer', p) |
|
a403c29ffaf9
Security fix default user permissions
Ralf Schlatterbeck <rsc@runtux.com>
parents:
4676
diff
changeset
|
305 |
|
a403c29ffaf9
Security fix default user permissions
Ralf Schlatterbeck <rsc@runtux.com>
parents:
4676
diff
changeset
|
306 # Coordinator may also edit users, so they may see everything: |
| 4434 | 307 db.security.addPermissionToRole('Coordinator', 'View', 'user') |
| 308 | |
| 309 # Allow Coordinator to edit any user, including their roles. | |
| 310 db.security.addPermissionToRole('Coordinator', 'Edit', 'user') | |
| 311 db.security.addPermissionToRole('Coordinator', 'Web Roles') | |
| 312 | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
313 |
| 4434 | 314 # Users should be able to edit their own details -- this permission is |
| 315 # limited to only the situation where the Viewed or Edited item is their own. | |
| 316 def own_record(db, userid, itemid): | |
| 317 '''Determine whether the userid matches the item being accessed.''' | |
| 318 return userid == itemid | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
319 |
|
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
320 |
| 4434 | 321 p = db.security.addPermission(name='View', klass='user', check=own_record, |
| 322 description="User is allowed to view their own user details") | |
| 323 for r in 'User', 'Developer', 'Coordinator': | |
| 324 db.security.addPermissionToRole(r, p) | |
| 325 p = db.security.addPermission(name='Edit', klass='user', check=own_record, | |
| 326 description="User is allowed to edit their own user details", | |
| 327 properties=('username', 'password', | |
| 328 'address', 'realname', | |
|
4676
d3f8d0be588c
Issue2550783 - change spelling of organization to organisation so that
rouilj
parents:
4457
diff
changeset
|
329 'phone', 'organisation', |
| 4434 | 330 'alternate_addresses', |
| 331 'queries', | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
332 'timezone')) # Note: 'roles' excluded - users should not be able to edit their own roles. |
| 4434 | 333 for r in 'User', 'Developer': |
| 334 db.security.addPermissionToRole(r, p) | |
| 335 | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
336 |
| 4434 | 337 # Users should be able to edit and view their own queries. They should also |
| 338 # be able to view any marked as not private. They should not be able to | |
| 339 # edit others' queries, even if they're not private | |
| 340 def view_query(db, userid, itemid): | |
| 341 private_for = db.query.get(itemid, 'private_for') | |
| 342 if not private_for: return True | |
| 343 return userid == private_for | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
344 |
|
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
345 |
| 4434 | 346 def edit_query(db, userid, itemid): |
| 347 return userid == db.query.get(itemid, 'creator') | |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
348 |
|
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
349 |
| 4434 | 350 p = db.security.addPermission(name='View', klass='query', check=view_query, |
| 351 description="User is allowed to view their own and public queries") | |
|
4437
261c9f913ff7
- Add explicit "Search" permissions, see Security Fix below.
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents:
4434
diff
changeset
|
352 p = db.security.addPermission(name='Search', klass='query') |
|
261c9f913ff7
- Add explicit "Search" permissions, see Security Fix below.
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents:
4434
diff
changeset
|
353 db.security.addPermissionToRole('User', p) |
| 4434 | 354 for r in 'User', 'Developer', 'Coordinator': |
| 355 db.security.addPermissionToRole(r, p) | |
| 356 p = db.security.addPermission(name='Edit', klass='query', check=edit_query, | |
| 357 description="User is allowed to edit their queries") | |
| 358 for r in 'User', 'Developer', 'Coordinator': | |
| 359 db.security.addPermissionToRole(r, p) | |
| 360 p = db.security.addPermission(name='Create', klass='query', | |
| 361 description="User is allowed to create queries") | |
| 362 for r in 'User', 'Developer', 'Coordinator': | |
| 363 db.security.addPermissionToRole(r, p) | |
| 364 | |
| 365 | |
| 366 # | |
| 367 # ANONYMOUS USER PERMISSIONS | |
| 368 # | |
| 369 # Let anonymous users access the web interface. Note that almost all | |
| 370 # trackers will need this Permission. The only situation where it's not | |
| 371 # required is in a tracker that uses an HTTP Basic Authenticated front-end. | |
| 372 db.security.addPermissionToRole('Anonymous', 'Web Access') | |
| 373 | |
| 374 # Let anonymous users access the email interface (note that this implies | |
| 375 # that they will be registered automatically, hence they will need the | |
|
7132
c087ad45bf4d
update Anonymous Create user to Register user permissions
John Rouillard <rouilj@ieee.org>
parents:
5879
diff
changeset
|
376 # "Register" user Permission below) |
| 4434 | 377 # This is disabled by default to stop spam from auto-registering users on |
| 378 # public trackers. | |
| 379 #db.security.addPermissionToRole('Anonymous', 'Email Access') | |
| 380 | |
| 381 # Assign the appropriate permissions to the anonymous user's Anonymous | |
| 382 # Role. Choices here are: | |
| 383 # - Allow anonymous users to register | |
|
7132
c087ad45bf4d
update Anonymous Create user to Register user permissions
John Rouillard <rouilj@ieee.org>
parents:
5879
diff
changeset
|
384 db.security.addPermissionToRole('Anonymous', 'Register', 'user') |
| 4434 | 385 |
| 386 # Allow anonymous users access to view issues (and the related, linked | |
| 387 # information). | |
| 388 | |
|
4454
cc402f5ad93e
Anonymous can only see bugs, but neither tasks nor milestones.
Stefan Seefeld <stefan@seefeld.name>
parents:
4437
diff
changeset
|
389 for cl in 'bug', 'severity', 'status', 'resolution', 'msg', 'file': |
| 4434 | 390 db.security.addPermissionToRole('Anonymous', 'View', cl) |
| 391 | |
|
5113
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
392 # Allow the anonymous user to use the "Show Unassigned" search. |
|
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
393 # It acts like "Show Open" if this permission is not available. |
|
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
394 # If you are running a tracker that does not allow read access for |
|
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
395 # anonymous, you should remove this entry as it can be used to perform |
|
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
396 # a username guessing attack against a roundup install. |
|
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
397 p = db.security.addPermission(name='Search', klass='user') |
|
8231
984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
John Rouillard <rouilj@ieee.org>
parents:
7213
diff
changeset
|
398 db.security.addPermissionToRole('Anonymous', p) |
|
5113
cf112b90fa8d
issue2550855: added search perms for anonymous to the user class.
John Rouillard <rouilj@ieee.org>
parents:
5049
diff
changeset
|
399 |
| 4434 | 400 # [OPTIONAL] |
| 401 # Allow anonymous users access to create or edit "issue" items (and the | |
| 402 # related file and message items) | |
| 403 #for cl in 'issue', 'file', 'msg': | |
| 404 # db.security.addPermissionToRole('Anonymous', 'Create', cl) | |
| 405 # db.security.addPermissionToRole('Anonymous', 'Edit', cl) | |
| 406 | |
| 407 | |
| 408 # vim: set filetype=python sts=4 sw=4 et si : | |
| 409 |
