James Moger
2012-10-10 20714aee0d2d2a989d93d6065e081aed8ac85fbf
refs
author James Moger <james.moger@gitblit.com>
Wednesday, October 10, 2012 00:05 -0400
committer James Moger <james.moger@gitblit.com>
Wednesday, October 10, 2012 00:05 -0400
commit20714aee0d2d2a989d93d6065e081aed8ac85fbf
tree ac1dfc4f2519b766ad1306a9fd2d2e8e9ecf8ac8 tree | zip | gz
parent c890e1f7d3f5cd83025b1d993cedf4990de63897 view | diff
Finer-grained repository access permissions (issue-36)

Implemented discrete repository access permissions to replace the
really primitive course-grained permissions used to this point. This
implementation allows for finer-grained access control, but still
falls short of integrated, branch-based permissions sought by some.

Access permissions follow the conventions established by Gitosis and
Gitolite so they should feel immediately comfortable to experienced
users. This permissions infrastructure is complete and works exactly as
expected. Unfortunately, there is no ui in this commit to change
permissions, that will be forthcoming. In the meantime, Gitblit
hot-reloads users.conf so the permissions can be manipulated at runtime
with a text editor.

The following per-repository permissions are now supported:
- V (view in web ui, RSS feeds, download zip)
- R (clone)
- RW (clone and push)
- RWC (clone and push with ref creation)
- RWD (clone and push with ref creation, deletion)
- RW+ (clone and push with ref creation, deletion, rewind)

And a users.conf entry looks something like this:

[user "hannibal"]
password = bossman
repository = RWD:topsecret.git
3 files added
31 files modified
3792 ■■■■■ changed files
docs/01_features.mkd 13 ●●●● diff | view | raw | blame | history
docs/01_setup.mkd 68 ●●●● diff | view | raw | blame | history
docs/04_releases.mkd 16 ●●●● diff | view | raw | blame | history
docs/permissions_matrix.ods diff | view | raw | blame | history
docs/permissions_matrix.png diff | view | raw | blame | history
src/com/gitblit/ConfigUserService.java 148 ●●●● diff | view | raw | blame | history
src/com/gitblit/Constants.java 72 ●●●●● diff | view | raw | blame | history
src/com/gitblit/DownloadZipFilter.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/FederationPullExecutor.java 49 ●●●● diff | view | raw | blame | history
src/com/gitblit/FileUserService.java 142 ●●●● diff | view | raw | blame | history
src/com/gitblit/GitBlit.java 75 ●●●●● diff | view | raw | blame | history
src/com/gitblit/GitFilter.java 46 ●●●●● diff | view | raw | blame | history
src/com/gitblit/GitServlet.java 35 ●●●●● diff | view | raw | blame | history
src/com/gitblit/GitblitUserService.java 12 ●●●●● diff | view | raw | blame | history
src/com/gitblit/IUserService.java 22 ●●●●● diff | view | raw | blame | history
src/com/gitblit/PagesFilter.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/SyndicationFilter.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/models/RepositoryModel.java 7 ●●●●● diff | view | raw | blame | history
src/com/gitblit/models/TeamModel.java 135 ●●●●● diff | view | raw | blame | history
src/com/gitblit/models/UserModel.java 187 ●●●● diff | view | raw | blame | history
src/com/gitblit/utils/JsonUtils.java 20 ●●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/BasePage.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/ForkPage.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/ForksPage.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/RepositoryPage.java 4 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/RootPage.java 2 ●●● diff | view | raw | blame | history
tests/com/gitblit/tests/FederationTests.java 2 ●●● diff | view | raw | blame | history
tests/com/gitblit/tests/GitBlitSuite.java 2 ●●● diff | view | raw | blame | history
tests/com/gitblit/tests/GitBlitTest.java 23 ●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/GitServletTest.java 217 ●●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/JGitUtilsTest.java 4 ●●● diff | view | raw | blame | history
tests/com/gitblit/tests/PermissionsTest.java 2391 ●●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/RpcTests.java 4 ●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/UserServiceTest.java 84 ●●●●● diff | view | raw | blame | history