[p4] Best way to determine if user has read access to file...
Jeff A. Bowles
jab at pobox.com
Wed May 14 20:22:39 PDT 2008
A quick-test led me one direction. (I swear, it looked like...)
Some nice chap from Tech Support set me straight...
-jab
On Wed, May 14, 2008 at 11:50 AM, Stephen Vance <steve at vance.com> wrote:
> Actually, protects seems to report the relevant group lines, as well. I
> think Jeff is mistaken on this point based on my experiments, although the
> documentation is not clear on this point.
>
> The weakness seems to the be caveat about exclusionary lines that Rick
> pointed out.
>
> Steve
>
>
> Jamie.Echlin at barclayscapital.com wrote:
>
>> yes, i had forgotten about the groups. OK, i think i will abandon this
>> and just login as the user and try to fstat it. cheers, jamie
>>
>>
>> ________________________________
>>
>> From: jeff.a.bowles at gmail.com [mailto:jeff.a.bowles at gmail.com]
>> On Behalf Of Jeff A. Bowles
>> Sent: 14 May 2008 15:24
>> To: Echlin, Jamie: IT (LDN)
>> Cc: perforce-user at perforce.com
>> Subject: Re: [p4] Best way to determine if user has read access
>> to file...
>>
>>
>> I am not connected at the moment so take this with a grain of
>> salt.
>> Logically, it would make sense that you would just say both: "-u
>> echlinj" and the filename. That will show you the lines in the
>> protection table for that user, specific to that file's path. (The
>> interesting line is the last one specified.)
>>
>> But...... and this is a big caveat:
>>
>> It doesn't take into account the groups that echlinj is in. The
>> tool truly seems to be for "p4 protect" debugging.
>>
>> (I suppose you could first find the groups that echlinj is in,
>> then use "p4 protects" for each one, but that is just ugly and
>> inefficient enough for me to want to avoid it.)
>>
>> -Jeff Bowles
>>
>> On Wed, May 14, 2008 at 5:01 AM,
>> <Jamie.Echlin at barclayscapital.com> wrote:
>>
>>
>> Afternoon,
>>
>> What's the best way to determine if a user has read
>> access to a file,
>> short of logging in as them and doing fstat or whatever.
>>
>> Let's say my protections are set up like this:
>>
>> write user echlinj * //depot/Jamgraph/...
>> write user echlinj * -//depot/Jamgraph/REL1.0/...
>>
>> So I have no read/write access to stuff under REL1.0. I
>> was hoping this
>> would work:
>>
>> > p4 -u p4admin protects -m -u echlinj
>> //depot/Jamgraph/REL1.0/src/gparticle.cpp
>> write
>>
>> However I don't have write access to that file.
>>
>> Without -m I get:
>>
>> write user echlinj * //depot/Jamgraph/...
>> write user echlinj * -//depot/Jamgraph/REL1.0/...
>>
>> I don't really want to parse that to work out which line
>> best matches
>> the file in question. There must be a better way.
>>
>>
>>
>>
>> _______________________________________________
>>
>> This e-mail may contain information that is confidential, privileged or
>> otherwise protected from disclosure. If you are not an intended recipient of
>> this e-mail, do not duplicate or redistribute it by any means. Please delete
>> it and any attachments and notify the sender that you have received it in
>> error. Unless specifically indicated, this e-mail is not an offer to buy or
>> sell or a solicitation to buy or sell any securities, investment products or
>> other financial product or service, an official confirmation of any
>> transaction, or an official statement of Barclays. Any views or opinions
>> presented are solely those of the author and do not necessarily represent
>> those of Barclays. This e-mail is subject to terms available at the
>> following link: www.barcap.com/emaildisclaimer. By messaging with
>> Barclays you consent to the foregoing. Barclays Capital is the investment
>> banking division of Barclays Bank PLC, a company registered in England
>> (number 1026167) with its registered offi!
>> ce at 1 Churchill Place, London, E14 5HP. This email may relate to or be
>> sent from other members of the Barclays Group.
>> _______________________________________________
>> _______________________________________________
>> perforce-user mailing list - perforce-user at perforce.com
>> http://maillist.perforce.com/mailman/listinfo/perforce-user
>>
>>
>>
>
> --
> Stephen Vance
> www.vance.com
>
>
>
--
---
Jeff Bowles - jeff.a.bowles at gmail.com
More information about the perforce-user
mailing list