"""Resources Constants. List of all the different resources available through our systems. Those strings need to be a match of the values that are in art_relations.vendor_resources or art_relations.orchadmin_resources. Note: Grass has for responsibility to authenticate users and dispatch the request to subsequent services. Each service should be responsible for having their own ACL to verify and grant access to users. """ from collections import namedtuple DB_PRIVILEGES_PROCEDURE_NAME = 'sp_get_vend_contact_privileges' RESOURCE_STATS = 'stats' DB_PRIVILEGES_OA_PROCEDURE_NAME = 'sp_get_orchadmin_user_privileges' RESOURCE_PAYMENT_HOLDS = 'paymentholds' RESOURCE_PRICING = 'pricing' RESOURCE_STORE_AVAILABILITY = 'store-availability' Resource = namedtuple('Resource', ['user_id', 'resource', 'privilege']) LinkedAccountResource = namedtuple( 'LinkedAccountResource', [ 'vc_id', 'vendor_id', 'subaccount_id', 'subaccount_name', 'label_identifier', 'vendor_name', 'company', 'auth0_user_id', 'auth0_primary', ], )