List Info

Thread: Perforce - reading p4 protect data




Perforce - reading p4 protect data
user name
2006-08-04 06:43:17
Hi,
 
Are there any APIs provided by Perforce or P4Perl which will help evaluate "p4 protect" data
 
For example: given a folder, I would like to find out what users or groups have access to it and what type of access.
 
If there is no such api, does anyone have a pseudo code or logic on how perforce evaluates them. Based on the P4 documentation it seems ;as though one would need to make passes of the data and maintain this in some another db. I would like to do this real-time
 
Any suggestions?
 
Thanks
Ashwin.
Perforce - reading p4 protect data
user name
2006-08-04 07:27:25
On Friday 04 August 2006 07:43, Ashwin Bhat wrote:
> Hi,
>
> Are there any APIs provided by Perforce or P4Perl which
will help evaluate
> "p4 protect" data
>
> For example: given a folder, I would like to find out
what users or groups
> have access to it and what type of access.
>
> If there is no such api, does anyone have a pseudo code
or logic on how
> perforce evaluates them. Based on the P4 documentation
it seems as though
> one would need to make passes of the data and maintain
this in some another
> db. I would like to do this real-time
>
> Any suggestions?

Try the new 'p4 protects' command in the 2006.1 server. 

    protects -- Display protections in place for a given
user/path

    p4 protects [ -a | -u user ] [ file ... ]

        'p4 protects' display the lines from the
protections table that
        apply to the current user.  The protections table is
managed by
        'p4 protect'.

        If the -a flag is given, protection lines for all
users are
        displayed.  If the -u user flag is given, protection
lines for that
        user are displayed.  The -u argument can also refer
to a group.

        If the file argument is given, only those protection
lines that
        apply to the named files are displayed.

        The -a and -u flags require 'super' access granted
by 'p4 protect'.

Tony
_______________________________________________
p4perl mailing list
p4perlperforce.com

http://maillist.perforce.com/mailman/listinfo/p4perl
Perforce - reading p4 protect data
user name
2006-08-04 15:11:21

Thanks. I'll try this out. We are on 2005.2.

 
On 8/4/06, Tony Smith <smee.org">tonysmee.org&gt; wrote:
On Friday 04 August 2006 07:43, Ashwin Bhat wrote:
>; Hi,
>
&gt; Are there any APIs provided by Perforce or P4Perl which will help evaluate
> "p4 protect&quot; data
>
> For example: given a folder, I would like to find out what users or groups
>; have access to it and what type of access.
&gt;
> If there is no such api, does anyone have a pseudo code or logic on how
> perforce evaluates them. Based on the P4 documentation it seems as though
>; one would need to make passes of the data and maintain this in some another
&gt; db. I would like to do this real-time
>
> Any suggestions?

Try the new 'p4 protects' command in the 2006.1 server.

&nbsp;  protects -- Display protections in place for a given user/path

 &nbsp; p4 protects [ -a | -u user ] [ file ... ]

 &nbsp;   ;  'p4 protects' display the lines from the protections table that
&nbsp; &nbsp; &nbsp;  apply to the current user. ; The protections table is managed by
 &nbsp;   ;  'p4 protect'.

 &nbsp; &nbsp; &nbsp; If the -a flag is given, protection lines for all users are
   ; &nbsp;  displayed.  ;If the -u user flag is given, protection lines for that
&nbsp; &nbsp; &nbsp;  user are displayed.  ;The -u argument can also refer to a group.

&nbsp; &nbsp;   ; If the file argument is given, only those protection lines that
 ; &nbsp; &nbsp;  apply to the named files are displayed.

 &nbsp; &nbsp; &nbsp; The -a and -u flags require 'super' access granted by 'p4 protect'.

Tony

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )