Module ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign NameStore Call NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call NameLoad keyword AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr keyword AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Expr Call AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore ListLoad AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad decorator_list decorator_list
N/A st2tests.base CleanDbTestCase st2common.services rbac rbac_services st2common.rbac.types PermissionType st2common.rbac.types ResourceType st2common.rbac.types SystemRole st2common.persistence.auth User st2common.persistence.rbac UserRoleAssignment st2common.persistence.rule Rule st2common.models.db.auth UserDB st2common.models.db.rbac UserRoleAssignmentDB st2common.models.db.rule RuleDB st2common.models.db.runner RunnerTypeDB RBACServicesTestCase N/A CleanDbTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super RBACServicesTestCase self setUp N/A N/A self users N/A N/A N/A self roles N/A N/A N/A self resources N/A N/A user_1_db N/A UserDB name admin N/A user_1_db N/A N/A User add_or_update user_1_db N/A N/A N/A self users N/A admin user_1_db N/A user_2_db N/A UserDB name observer N/A user_2_db N/A N/A User add_or_update user_2_db N/A N/A N/A self users N/A observer user_2_db N/A user_3_db N/A UserDB name no_roles N/A user_3_db N/A N/A User add_or_update user_3_db N/A N/A N/A self users N/A no_roles user_3_db N/A user_4_db N/A UserDB name custom_role N/A user_4_db N/A N/A User add_or_update user_4_db N/A N/A N/A self users N/A 1_custom_role user_4_db N/A role_1_db N/A N/A rbac_services create_role name custom_role_1 N/A role_2_db N/A N/A rbac_services create_role name custom_role_2 description custom role 2 N/A N/A N/A self roles N/A custom_role_1 role_1_db N/A N/A N/A self roles N/A custom_role_2 role_2_db N/A role_assignment_1 N/A UserRoleAssignmentDB user N/A N/A N/A self users N/A 1_custom_role name role N/A N/A N/A self roles N/A custom_role_1 name N/A role_assignment_1 N/A N/A UserRoleAssignment add_or_update role_assignment_1 N/A rule_1_db N/A RuleDB pack test1 name rule1 ref test1.rule1 N/A rule_1_db N/A N/A Rule add_or_update rule_1_db N/A N/A N/A self resources N/A rule_1 rule_1_db N/A test_get_all_roles N/A N/A self N/A N/A N/A role_dbs N/A N/A rbac_services get_all_roles N/A N/A N/A self assertEqual N/A len role_dbs N/A len N/A self roles N/A test_get_roles_for_user N/A N/A self N/A N/A N/A user_db N/A N/A self users N/A no_roles N/A role_dbs N/A N/A rbac_services get_roles_for_user user_db user_db N/A N/A N/A self assertItemsEqual role_dbs N/A N/A role_dbs N/A N/A user_db get_roles N/A N/A N/A self assertItemsEqual role_dbs N/A N/A user_db N/A N/A self users N/A 1_custom_role N/A role_dbs N/A N/A rbac_services get_roles_for_user user_db user_db N/A N/A N/A self assertItemsEqual role_dbs N/A N/A N/A self roles N/A custom_role_1 N/A role_dbs N/A N/A user_db get_roles N/A N/A N/A self assertItemsEqual role_dbs N/A N/A N/A self roles N/A custom_role_1 N/A test_create_role_with_system_role_name N/A N/A self N/A N/A N/A expected_msg "observer" role name is blacklisted N/A N/A N/A self assertRaisesRegexp ValueError expected_msg N/A rbac_services create_role name N/A SystemRole OBSERVER N/A test_delete_system_role N/A N/A self N/A N/A N/A system_roles N/A N/A SystemRole get_valid_values N/A name system_roles N/A N/A expected_msg System roles can't be deleted N/A N/A N/A self assertRaisesRegexp ValueError expected_msg N/A rbac_services delete_role name name N/A test_grant_and_revoke_role N/A N/A self N/A N/A N/A user_db N/A UserDB name test-user-1 N/A user_db N/A N/A User add_or_update user_db N/A role_dbs N/A N/A rbac_services get_roles_for_user user_db user_db N/A N/A N/A self assertItemsEqual role_dbs N/A N/A role_dbs N/A N/A user_db get_roles N/A N/A N/A self assertItemsEqual role_dbs N/A N/A N/A N/A rbac_services assign_role_to_user role_db N/A N/A self roles N/A custom_role_1 user_db user_db N/A role_dbs N/A N/A rbac_services get_roles_for_user user_db user_db N/A N/A N/A self assertItemsEqual role_dbs N/A N/A N/A self roles N/A custom_role_1 N/A role_dbs N/A N/A user_db get_roles N/A N/A N/A self assertItemsEqual role_dbs N/A N/A N/A self roles N/A custom_role_1 N/A N/A N/A rbac_services revoke_role_from_user role_db N/A N/A self roles N/A custom_role_1 user_db user_db N/A role_dbs N/A N/A rbac_services get_roles_for_user user_db user_db N/A N/A N/A self assertItemsEqual role_dbs N/A N/A role_dbs N/A N/A user_db get_roles N/A N/A N/A self assertItemsEqual role_dbs N/A N/A test_get_all_permission_grants_for_user N/A N/A self N/A N/A N/A user_db N/A N/A self users N/A 1_custom_role N/A role_db N/A N/A self roles N/A custom_role_1 N/A permission_grants N/A N/A rbac_services get_all_permission_grants_for_user user_db user_db N/A N/A N/A self assertItemsEqual permission_grants N/A N/A resource_db N/A N/A self resources N/A rule_1 N/A permission_types N/A N/A PermissionType RULE_CREATE N/A PermissionType RULE_MODIFY N/A permission_grant N/A N/A rbac_services create_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A permission_grants N/A N/A rbac_services get_all_permission_grants_for_user user_db user_db N/A N/A N/A self assertItemsEqual permission_grants N/A permission_grant N/A permission_grants N/A N/A rbac_services get_all_permission_grants_for_user user_db user_db resource_types N/A N/A ResourceType PACK N/A N/A N/A self assertItemsEqual permission_grants N/A N/A permission_grants N/A N/A rbac_services get_all_permission_grants_for_user user_db user_db resource_types N/A N/A ResourceType RULE N/A N/A N/A self assertItemsEqual permission_grants N/A permission_grant N/A test_create_and_remove_permission_grant N/A N/A self N/A N/A N/A role_db N/A N/A self roles N/A custom_role_2 N/A resource_db N/A N/A self resources N/A rule_1 N/A permission_types N/A N/A PermissionType RULE_ALL N/A N/A N/A rbac_services create_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A N/A N/A role_db reload N/A N/A N/A self assertItemsEqual N/A role_db permission_grants N/A role_db permission_grants N/A N/A N/A rbac_services remove_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A N/A N/A role_db reload N/A N/A N/A self assertItemsEqual N/A role_db permission_grants N/A N/A test_manipulate_permission_grants_unsupported_resource_type N/A N/A self N/A N/A N/A role_db N/A N/A self roles N/A custom_role_2 N/A resource_db N/A RunnerTypeDB N/A permission_types N/A N/A PermissionType RULE_ALL N/A expected_msg Permissions cannot be manipulated for a resource of type N/A N/A N/A self assertRaisesRegexp ValueError expected_msg N/A rbac_services create_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A expected_msg Permissions cannot be manipulated for a resource of type N/A N/A N/A self assertRaisesRegexp ValueError expected_msg N/A rbac_services remove_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A test_manipulate_permission_grants_invalid_permission_types N/A N/A self N/A N/A N/A role_db N/A N/A self roles N/A custom_role_2 N/A resource_db N/A N/A self resources N/A rule_1 N/A permission_types N/A N/A PermissionType ACTION_EXECUTE N/A expected_msg Invalid permission type N/A N/A N/A self assertRaisesRegexp ValueError expected_msg N/A rbac_services create_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A expected_msg Invalid permission type N/A N/A N/A self assertRaisesRegexp ValueError expected_msg N/A rbac_services remove_permission_grant_for_resource_db role_db role_db resource_db resource_db permission_types permission_types N/A N/A