* Don't allow the first and last addresses being assigned #1241 Show all e-mail addresses associated with a username #1291 Add permission 'manage peering sessions' #1290 Put an Icon next to user name on https://www.peeringdb.com/org/nnnn#users if the user is using U2F #1238 Tie TOTP devices and Webauthn Security Keys to the user account #1339 v2 Search (#1204) pin django peeringdb 3.0.1 and poetry relock linting * fix codeql warning: DOM text reinterpreted as HTML * fix global stats tests --------- Co-authored-by: 20C <code@20c.com>
1.6 KiB
Generated from org_admin_views.py on 2023-04-12 10:09:44.563425
peeringdb_server.org_admin_views
View for organization administrative actions (/org endpoint).
Functions
extract_permission_id
def extract_permission_id(source, dest, entity, org)
Extract a user's permissioning id for the specified entity from source and store it in dest .
Source should be a dict containing django-namespace-perms (namespace, level) items.
Dest should be a dict where permission ids are to be exracted to.
Entity can either be a HandleRef instance or class.
Org must be an Organization instance that owns the entity.
load_all_user_permissions
def load_all_user_permissions(org)
Return dict of all users with all their permissions for the given org.
load_entity_permissions
def load_entity_permissions(org, entity)
Return entity's permissions for the specified org.
org_admin_required
def org_admin_required(fnc)
Decorator function that ensures that the requesting user has administrative rights to the targeted organization.
Also sets "org" in kwargs.
permission_ids
def permission_ids(org)
Return a dict of a valid permissioning ids for the specified organization.
save_user_permissions
def save_user_permissions(org, user, perms)
Save user permissions for the specified org and user.
Perms should be a dict of permissioning ids and permission levels.
target_user_validate
def target_user_validate(fnc)
Decorator function that ensures that the targeted user is a member of the targeted organization.
Should be below org_admin_required.
Also sets "user" in kwargs.