Commit Graph

15 Commits

Author SHA1 Message Date
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Seth Foster
843c22c6b1 Allow orphaned user to be added to org
Fixed bug where an org admin was not able to add
an orphaned user to the org, in the case where the
orphan had an ancestor role that matched one of the
roles for of the org admin.

scenario to fix -- sue is member of cred1, where cred1 is
part of org1. org1 admin cannot add sue to org1, because
the cred1 role for sue has an ancestor to org1 role. The org1
admin cannot change or attach sue to org1.

tower issue #4198 and #4197
2020-04-02 14:24:55 -04:00
Jeff Bradberry
0ba87c9729 Add more test checks for the alternate code path to the role checks 2019-04-18 14:53:19 -04:00
Jeff Bradberry
41b476544d Improve test coverage of attaching a user to an organization 2019-04-18 13:35:35 -04:00
AlanCoding
e044b996e5 allow adding teams to org object roles 2018-07-09 14:13:57 -04:00
AlanCoding
e04a07f56c cover testing of new 3.3 org roles for user security fix 2018-05-24 13:56:38 -04:00
AlanCoding
a344ceda0e User editing permission changes
Only allow administrative action for a user
who is a system admin or auditor if the
the requesting-user is a system admin.

Previously a user could be edited if the
requesting-user was an admin of ANY of the
orgs the user was member of.
This is changed to require admin permission
to ALL orgs the user is member of.

As a special-case, allow org admins to add
a user as a member to their organization if
the following conditions are met:
- the user is not member of any other orgs
- the org admin has permissions to all of
  the roles the user has
2018-04-06 09:51:08 -04:00
Wayne Witzel III
067ead35ac Extend test and fix to include the admin_role 2018-04-02 15:39:01 -04:00
Wayne Witzel III
ea7a0b2f58 Fixes RBAC issue, ensures can admin of sub_obj when needed 2018-04-02 14:10:14 -04:00
AlanCoding
c4bc310271 remove raw SQL in visible_roles 2017-11-29 16:04:31 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
AlanCoding
c631761091 check team permissions if attaching user roles 2016-06-13 12:34:10 -04:00
AlanCoding
b485b85076 TeamRolesList permission tests and fix, organize tests 2016-06-13 11:09:48 -04:00
AlanCoding
7f38227e11 fix bug in RoleTeamsList 2016-06-11 18:04:05 -04:00
AlanCoding
3e97bdae7f add reverse attach access checks pointing toward roles 2016-06-10 17:12:26 -04:00