[p4] A critical permisson in perforce

Tetlow, Gordon gtetlow at soe.sony.com
Thu May 18 13:44:12 PDT 2006


> -----Original Message-----
> From: perforce-user-bounces at perforce.com 
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of - C Saha -
> Sent: Wednesday, May 17, 2006 9:10 PM
> To: p4sync at yahoo.com; perforce-user at perforce.com
> Subject: [p4] A critical permisson in perforce
> 
> Hi All 
>    
>   Here is a critical situation in granting permission in perforce ...
>    
>    
>   Mr X wants 
>    
>     
>    Read/Write access to //hardware depot to be restricted to 
> Mr Y, Mr Z and myself (Mr X)   
>    Read/Write access to //hardware/*/... be granted to all 
> others that currently have read/write access to //hardware/... 
>   In other words, if there are no files in //hardware/foo 
> then only the above 3 people can create a file under foo.  
> However, if //hardware/foo already has one or more files 
> submitted under it, then all others with read/write access 
> can create under foo.
>    
>   The intent is to keep the top level of the //hardware/... 
> depot from being populated by anyone except for the group 
> explicitly granted permission.
>    
>   This kind of restriction is clearly available under a Linux 
> or Windows file system.  Can Perforce apply a similar 
> restriction to its depot structure?
>    
>    
>   I was just wondering if the request by Mr X can be executed 
> or not. Anybody, any idea?

You can either enumerate permissions like this:

write group coolpeople * //hardware/...
write group lusers * //hardware/A/...
write group lusers * //hardware/B/...
write group lusers * //hardware/C/...
etc...

or write a trigger.

I vote for A myself, although that depends on how often top level
directories get made.

-gordon



More information about the perforce-user mailing list