Mercurial > p > roundup > code
annotate share/roundup/templates/devel/schema.py @ 8231:984bc9f94ec6
chore: format schema.pys in templates so ruff is ok.
Also makes comparing them easier.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 21 Dec 2024 15:23:12 -0500 |
| parents | 670ab365e76f |
| children | d0460348bf9a |
| 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 | |
|
5136
602d544e3a93
fixing some mismatched patches/patch references that I borked in a prior checkin. Patch support was not and still is not working. But at least this tracker runs without errors with demo.py -t devel, just missing features.
John Rouillard <rouilj@ieee.org>
parents:
5134
diff
changeset
|
130 patches = FileClass(db, "patches", |
| 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 # patches = Multilink("patches") | |
| 148 # nosy = Multilink("user") | |
| 149 # superseder = Multilink("issue") | |
| 150 bug = IssueClass(db, "bug", | |
| 151 type=Link('bug_type'), | |
| 152 components=Multilink('component'), | |
| 153 versions=Multilink('version'), | |
| 154 severity=Link('severity'), | |
| 155 priority=Link('priority'), | |
| 156 dependencies=Multilink('bug'), | |
| 157 assignee=Link('user'), | |
| 158 status=Link('status'), | |
| 159 resolution=Link('resolution'), | |
| 160 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
|
161 keywords=Multilink('keyword'), |
|
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
|
162 patches=Multilink('patches')) |
| 4434 | 163 |
| 164 # Task Type | |
| 165 task_type = Class(db, 'task_type', | |
| 166 name=String(), | |
| 167 description=String(), | |
| 168 order=Number()) | |
| 169 task_type.setkey('name') | |
| 170 | |
| 171 # IssueClass automatically gets these properties in addition to the Class ones: | |
| 172 # title = String() | |
| 173 # messages = Multilink("msg") | |
| 174 # files = Multilink("file") | |
| 175 # nosy = Multilink("user") | |
| 176 # superseder = Multilink("issue") | |
| 177 task = IssueClass(db, "task", | |
| 178 type=Link('task_type'), | |
| 179 components=Multilink('component'), | |
| 180 priority=Link('priority'), | |
| 181 dependencies=Multilink('task'), | |
| 182 assignee=Multilink('user'), | |
| 183 status=Link('status'), | |
| 184 resolution=Link('resolution'), | |
| 185 solves=Link('bug')) | |
| 186 | |
| 187 milestone = IssueClass(db, "milestone", | |
| 188 bugs=Multilink("bug"), | |
| 189 tasks=Multilink("task"), | |
| 190 status=Link("status"), | |
| 191 release_date=String()) | |
| 192 | |
| 193 # | |
| 194 # TRACKER SECURITY SETTINGS | |
| 195 # | |
| 196 # See the configuration and customisation document for information | |
| 197 # about security setup. | |
| 198 | |
| 199 db.security.addRole(name='Developer', description='A developer') | |
| 200 db.security.addRole(name='Coordinator', description='A coordinator') | |
| 201 | |
| 202 # | |
| 203 # REGULAR USERS | |
| 204 # | |
| 205 # Give the regular users access to the web and email interface | |
| 206 for r in 'User', 'Developer', 'Coordinator': | |
| 207 db.security.addPermissionToRole(r, 'Web Access') | |
| 208 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
|
209 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
|
210 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
|
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', |
|
a403c29ffaf9
Security fix default user permissions
Ralf Schlatterbeck <rsc@runtux.com>
parents:
4676
diff
changeset
|
302 'vcs_name', 'username')) |
|
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 |
