James Moger
2012-10-23 2bfb8ab137ac18b60cad0c375c7b9bef67499b94
refs
author James Moger <james.moger@gitblit.com>
Tuesday, October 23, 2012 17:35 -0400
committer James Moger <james.moger@gitblit.com>
Tuesday, October 23, 2012 17:35 -0400
commit2bfb8ab137ac18b60cad0c375c7b9bef67499b94
tree ab0785d8a59bbe5d6f2a6e954375049435755194 tree | zip | gz
parent 479cc28bdf743b778f9528bd0e9b997541aead53 view | diff
Enforce strict order for permission determination

The order of permissions defined within a user or team is preserved
during read and write. This order is important for determining the
regex match used within the user or team object.

If the user is an admin or repository owner, then RW+
Else if user has an explicit permission, use that
Else check for the first regex match in user permissions
Else check for the HIGHEST permission from team memberships

If the team is an admin team, then RW+
Else if a team has an explicit permission, use that
Else check for the first regex match in team permissions
3 files modified
150 ■■■■■ changed files
src/com/gitblit/models/TeamModel.java 8 ●●●●● diff | view | raw | blame | history
src/com/gitblit/models/UserModel.java 22 ●●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/PermissionsTest.java 120 ●●●●● diff | view | raw | blame | history