Re: Does git have "Path-Based Authorization"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 30 Sep 2011, Grant wrote:

I have a series of files containing server-side code which make up a
website.  The entire layout contains only a few folders, but those
folders contain many files.  I want to be able to allow access to only
certain files at a time, sometimes only a single file.  Can that be
done in the way you describe?

If you can gather all sensitive files in a subdirectory, then you can
split that directory into its own repository (see git-submodule man
page) and grant limited access to that repo.
--
Duy

I thought about separating files the dev has had access to into a
separate folder from files the dev hasn't had access to, but it would
mean constantly changing the code as files move around, plus it would
be too complicated if I have multiple devs and want to give them
access to different stuff.  It's not that some files are more
sensitive than others, it's just that I don't want to give anyone
access to more than I have to.

the thing to think about is why would you want to give a dev access to a file or restrict their access.

Remember that the Dev should be able to test their changes, so you really need to give them access to enough stuff to be a complete, working set.

If you make each set of things it's own repository, then you should have the granularity you are looking for.

If you think you will need more granularity, please explain what you are thinking of?

Also remember that you don't want to have your development files on your production site, so you probably don't want to deploy directly from your repository to the production site. If you use a filter to make a new git repository that only contains the pieces that you are wanting to publish, and keep that repository clean, only submitting the files that you want there, but treat it as a read-only repository (i.e. no development work done there), you should be in good shape.

David Lang

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]