orm

Functions

accounting_for_user(session, user) Returns a list of Accounting objects, each containing an application and the associated policy that the specified orm user is allowed to run.
detached_session(db) Creates a session where at the end, the objects retrieved are detached from the session itself
transaction(session) handles a transaction in a session.


remoteappmanager.db.orm.accounting_for_user(session, user)[source]

Returns a list of Accounting objects, each containing an application and the associated policy that the specified orm user is allowed to run. If the user is None, the default is to return an empty list. The id is a unique string identifying the combination of application and policy. It is not unique per user.

Parameters:
  • session (Session) – The current session
  • user (User or None) – the orm User, or None.
Returns:

Return type:

A list of Accounting objects

remoteappmanager.db.orm.detached_session(db)[source]

Creates a session where at the end, the objects retrieved are detached from the session itself

remoteappmanager.db.orm.transaction(session)[source]

handles a transaction in a session.