|
a/Allura/allura/app.py |
|
b/Allura/allura/app.py |
|
... |
|
... |
174 |
is 'production'.
|
174 |
is 'production'.
|
175 |
:cvar bool searchable: If True, show search box in the left menu of this
|
175 |
:cvar bool searchable: If True, show search box in the left menu of this
|
176 |
Application. Default is True.
|
176 |
Application. Default is True.
|
177 |
:cvar list permissions: Named permissions used by instances of this
|
177 |
:cvar list permissions: Named permissions used by instances of this
|
178 |
Application. Default is [].
|
178 |
Application. Default is [].
|
|
|
179 |
:cvar dict permissions_desc: Descriptions of the named permissions.
|
179 |
:cvar bool installable: Default is True, Application can be installed in
|
180 |
:cvar bool installable: Default is True, Application can be installed in
|
180 |
projects.
|
181 |
projects.
|
181 |
:cvar bool hidden: Default is False, Application is not hidden from the
|
182 |
:cvar bool hidden: Default is False, Application is not hidden from the
|
182 |
list of a project's installed tools.
|
183 |
list of a project's installed tools.
|
183 |
:cvar str tool_description: Text description of this Application.
|
184 |
:cvar str tool_description: Text description of this Application.
|
|
... |
|
... |
280 |
a ``{permission: description}`` mapping.
|
281 |
a ``{permission: description}`` mapping.
|
281 |
|
282 |
|
282 |
Returns empty string if there is no description for ``permission``.
|
283 |
Returns empty string if there is no description for ``permission``.
|
283 |
|
284 |
|
284 |
"""
|
285 |
"""
|
285 |
if not hasattr(cls, '_permissions_desc'):
|
|
|
286 |
d = {}
|
286 |
d = {}
|
287 |
for t in reversed(cls.__mro__):
|
287 |
for t in reversed(cls.__mro__):
|
288 |
d = dict(d, **getattr(t, 'permissions_desc', {}))
|
288 |
d = dict(d, **getattr(t, 'permissions_desc', {}))
|
289 |
cls._permissions_desc = d
|
|
|
290 |
return cls._permissions_desc.get(permission, '')
|
289 |
return d.get(permission, '')
|
291 |
|
290 |
|
292 |
def parent_security_context(self):
|
291 |
def parent_security_context(self):
|
293 |
"""Return the parent of this object.
|
292 |
"""Return the parent of this object.
|
294 |
|
293 |
|
295 |
Used for calculating permissions based on trees of ACLs.
|
294 |
Used for calculating permissions based on trees of ACLs.
|