Add site divisions within Review Board.
Review Request #1795 — Created Sept. 26, 2010 and submitted
Add site divisions within Review Board. This change adds a new app within RB called "site", which will be used to divide a single review board server with permissions barriers. At the moment, a LocalSite has a name and a list of users who have access to that site. This is related to various objects via a foreign key. If that relation is null, the given object is treated as being totally open. If not, the requesting user will be checked against the users list. The plan is to namespace our URLs such that most views can either be at the root (for example, "/r/1/") or prefixed with the LocalSite name ("/site-name/r/1/"). If an object has a LocalSite set, it *must* be accessed via the URL with the name. While many objects will have pks that are universally the same (comments, for example), we want it to appear as if, for all intents and purposes, they have their own reviewboard instance running in a rooted name. The one special object as far as IDs go is ReviewRequest. This has both a pk and a "local_id" field. The local_id is a special field which is unique among all ReviewRequests that have the same local_site. This allows us to give the sites their own ID namespaces, since people will be passing the IDs on the command-line for post-review.
- Change Summary:
-
- Change naming slightly - Introduce a new "local ID" mechanism that will allow us to namespace URLs and prevent user-visible IDs from spiraling out of control. - Change the LocalSite.name field to be a slug, so we can use it in URLs.
- Diff:
-
Revision 2 (+209 -4)
- Change Summary:
-
- Clarify naming further (always "local_site"). - Add site-specific review request ID namespacing. - Remove permissions checking from this diff, since the mechanism will be changing somewhat.
- Summary:
-
Add site divisions within Review Board with permission checking.Add site divisions within Review Board.
- Description:
-
~ Add site divisions within Review Board with permission checking.
~ Add site divisions within Review Board.
This change adds a new app within RB called "site", which will be used to divide
a single review board server with permissions barriers. At the moment, a ~ LocalSite has a name and a list of users who have access to that site. This is ~ LocalSite has a name and a list of users who have access to that site. This is related to various objects via a foreign key. If that relation is null, the ~ given object is treated as being totally open. If not, the requesting user is ~ checked against the users list. ~ given object is treated as being totally open. If not, the requesting user will ~ be checked against the users list. + + The plan is to namespace our URLs such that most views can either be at the root
+ (for example, "/r/1/") or prefixed with the LocalSite name ("/site-name/r/1/"). + If an object has a LocalSite set, it must be accessed via the URL with the + name. While many objects will have pks that are universally the same (comments, + for example), we want it to appear as if, for all intents and purposes, they + have their own reviewboard instance running in a rooted name. + + The one special object as far as IDs go is ReviewRequest. This has both a pk and
+ a "local_id" field. The local_id is a special field which is unique among all + ReviewRequests that have the same local_site. This allows us to give the sites + their own ID namespaces, since people will be passing the IDs on the + command-line for post-review. - Diff:
-
Revision 3 (+124 -2)
- Change Summary:
-
- Add a relation for marking admin users (currently unused) - Make sure things have good related_names.
- Diff:
-
Revision 5 (+124 -2)