Closed (fixed)
Project:
Version Control / Project* integration
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
25 Apr 2010 at 19:16 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikey_p commentedI was thinking about this the other day, and I think it'd be reasonable safe to push per-branch permissions to phase 3. We don't have this now, and we seems to get along okay (I don't know of any requests to add it, or any projects needing it), and since we'll already be metering access by repo, that will map well to the per-directory solution that we have now in CVS.
Comment #2
damien tournoud commentedBranch-level grants is definitely phase 3, except if it's easier to do that directly in phase 2.
Comment #3
sdboyer commentedI'd prefer to see them as an (early) phase 3 thing, but the big blocker there is core. We could make that run off a separate system, but I wrote up comments on the problems with that recently: #714034-56: Determine the access control solution for git . Alternately, we could just manually set up core's ACLs appropriately. Or just let core do without for a little while - I think the social onus is probably sufficient to keep a core branch maintainer from going renegade :)
Comment #4
CorniI commentedwell I don't think core should hold us up there, core maintainers are trustworthy enough to not behave properly.
So this issue probably needs to be splitted, one for per-branch permissions (phase 3) and one for the general UI+gitolite backend for phase 2.
Comment #5
dwwYes, and this doesn't belong as a d.o infra issue. The UI for this is going to be provided by versioncontrol_project.module and friends. In fact, I bet this issue is a duplicate, but I don't have time to search right now.
Comment #6
dwwI'm actually tempted to call this duplicate with #69556: move "cvs access" tab into project, make it generic. I'm wondering if this should be versioncontrol_project's problem at all, or if we want a more generic solution in project itself.
Comment #7
sdboyer commentedI initially didn't quite see how this would work, but it's making more sense the more I think about it. Having this recorded in a more generic, project-facing way means that more things nifty things can be done in the issue queues, per the discussion in that issue. I think the important thing would be to make sure that project has some sort of node_save-type broadcast hook which is invoked that'll make loose coupling easier between project's way of thinking about the ACLs and versioncontrol. In this case, I think it'd be versioncontrol_project that picked up those hooks and moved the data into the tables that versioncontrol expects. That's a bit of data duplication, yes, but I'm more inclined for this kind of loose coupling because a) versioncontrol and project really are two separate systems, b) because conceptually, ACL information is something that's tightly grouped with repositories, and c) if we end up needing/wanting to put our ACL info into something faster (mongo, cassandra, whatever) for handling network operations, this would be the obvious spot to do it.
Comment #8
hunmonk commentedadding redesign tags
Comment #9
dwwThis is blocked on #69556: move "cvs access" tab into project, make it generic. Once that issue is done and deployed, this issue can become active again for injecting a "Maintain version control" checkbox (or whatever) on the /node/N/maintainers tab on project nodes and then save those values into the appropriate vcapi tables.
Comment #10
dwwI'll be working on this for sprint #2
Comment #11
sdboyer commentedSo this is done now, right?
Comment #12
dwwNot at all. There's a "Write to CVS" checkbox from cvs.module thanks to #880818: Remove CVS access tab in favor of the project maintainers form. We have no such checkbox provided by vc_project that tells vcapi to give user N access to write to the VCS for project X. It's easy, but not done.
Comment #13
dwwThis is for Git, not d.o redesign.
Comment #14
mikey_p commentedSpoke with sdboyer about this in #drupal-vcs the other day and I'm going to try to sum up my understanding as closely as possible.
Since each module that hooks into project_maintainer permissions is responsible for storing it's data and permissions itself, the question was where the permissions that are exposed via the maintainers tab would be stored. Would it be in a table owned by versioncontrol_project (associated with the project ID), or as part of VC API (associated with the repo ID)? The conclusion seems to be that although VC API has this functionality know, it's going to be killed, and that versioncontrol_project should store this data in it's own tables, and not worry about interfacing ACLs with VC API until VC API supported per branch permissions.
Comment #15
dwwWe need to talk to Sam, then, since I think it'd be a terrible mistake for VCAPI to only support ACLs via vc_project. That means each backend would have to know about vc_project to be able to handle ACLs at all. ACLs seemed to be one of the few features that all VCS's want to support that could fairly easily be abstracted by VCAPI, instead of having tons of low-level logic without any layer of indirection. This sounds like a giant regression in VCAPI to me. Before we work on this, we need to discuss and clarify why we're taking such a big step backwards...
Comment #16
marvil07 commentedDetails about what is going to happen with authentication on vcs api: #223891: API change: make authentication management pluggable (we are now in the process of re-factor accounts inside the vcs api).
BTW commit_restrictions module is not really touched long time ago, but we probably want to discuss about it after the re-factor is done. I do not see the removing of that module IIRC.
Comment #17
sdboyer commentedQuick clarification re: #14 & #15 - authentication is becoming pluggable. VCAPI will probably provide some (or maybe a lot) of the plugins that do the basic auth themselves - and to whatever extent those plugins require their own tables, VCAPI will also own those. However, it'll be up to some combination of the implementing module (in this case, vc_project) and the backend to determine which of the plugins to actually _use_ on a given repository.
Comment #18
sdboyer commentedMarking this for sprint 6. I'm going to try to work on this, because it'll be the real test of whether we did #223891: API change: make authentication management pluggable properly.
Comment #19
eliza411 commentedTagging for Git Sprint 7.
Comment #20
mikey_p commentedAssigning this to myself since I'm getting started on it.
Comment #21
mikey_p commentedUpping version.
Comment #22
mikey_p commentedThis is a start to making project maintainer permissions work. This is just all or nothing access to each repo, and deleting a user doesn't work due to #1003946: VersioncontrolAuthHandlerMappedAccounts has no way to delete rows from auth table. This also requires #1003904: Queries in VersioncontrolAuthHandlerMappedAccounts::save not actually executed to be applied, or updating maintainer perms will fail.
Comment #23
mikey_p commentedThe two issues mentioned in #22 are resolved, and this is 99% working, although it still needs the patch from #1003552: Pass the project to hook_project_permission_info() to be applied to project to get the proper context to show the correct perms, even though we could parse this from menu_get_object.
Comment #24
dwwFrom a Project* perspective, this mostly looks fine to me, with the following minor nitpick:
A) This chunk:
could be simplified to:
Besides that, this seems fine. Ideally, we'd get one of the VCAPI maintainers to also review this to make sure they're also happy. ;) Otherwise, I'd just RTBC this myself right now.
Comment #25
dwwWell, I guess needs work for 24.A...
Comment #26
mikey_p commentedFixed the issue from #24.
I'm still not thrilled with the flexibility and pluggablity of this approach, there are a number of conditions where it would start to break down with radically different repo structures (such as multiple projects per repo), but this should work okay for now provided that the twisted ssh/git server likes the data that VC API exposes from the auth plugins.
Comment #27
sdboyer commentedLooks great, from the vcapi integration perspective.
Comment #28
mikey_p commentedFound some bugs in this when saving an existing, or new node. I just need another place to check the existence of a repo for a given project since it may not be loaded onto a node that is being saved, as I'm currently checking in hook_project_permission_info().
Comment #29
mikey_p commentedSwapped this around to use the helper function for loading a repo given a known project_id instead of counting on the repo being populated when saving the node.
Comment #30
mikey_p commentedCommitted the patch from #29.