[p4] counters and what permissions are needed to access/setthem.

Jeff Grills jgrills at drivensnow.org
Thu Oct 19 22:10:25 PDT 2006


Just some late night ramblings... It doesn't currently, but if the spec
depot tracked counter changes, you'd be able to undo any mischief a user
caused so giving users write access to all counters wouldn't be too risky.
Spec tracking of counters would be worth it in general, not just
specifically for this task.   It might be nice if there was a way to invoke
a trigger on counter writes (and possibly reads as well) - that way we could
implement the user security ourselves and whatever else we may desire.
Although, maybe it'd be best if we had protection table support for writing
to counters - if counters shared the same namespace with depots and labels
and clients, then we could use //countername in the protections table. I'm
sure that change would break some installations, but it could also give us
the ability to do "p4 sync //... at countername", which currently can't be
done.  That seems so incredibly useful to me - perhaps it could be a server
option for sites that had no namespace conflicts?  I'd also be happier if
counters would be strings as well, because in this case the user would
probably need counters for RELEASE_MAJOR and RELEASE_MINOR, which really
they might have wanted anyway.  I'd still like counters to support integers,
and it would be really nice if there was a "p4 counter -i countername" to
atomically increment the counter and return the new value.  Perhaps a
trigger for writing to a counter could be used to atomically increment a
counter, although it would have to hold a lock write while the trigger was
running to do that.

Anyway, have a good night!

j

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Stephen Vance
Sent: Thursday, October 19, 2006 11:04 PM
To: William Deegan
Cc: Perforce Users
Subject: Re: [p4] counters and what permissions are needed to
access/setthem.


There is no way to control access to a specific counter other than the 
special counters that require "super" and the -f option to change like 
"journal," and "change".

"Review" is a subset of "super." Everything is a subset of "super". 
"Review" is higher than write but lower than admin and has some 
capabilities of its own to support its purpose.

I think you'll need another mechanism. Why not an administrative depot 
or section of your depot with the value in a file or as the name of a 
file? You can control the permissions tightly on that.

Steve

William Deegan wrote:
> Greetings,
>
> Is there a way to give users access to a specific counter?
> I see that the review permission is required to set a counter. Is that 
> a superset of "super"?
>
> I was considering using a counter to keep track of the minor version 
> number for releases. So I would have a counter RELEASE_1.2
> If this requires super or review permission (since any user may be
> incrementing the
> minor version number, as requested by my client), then I'll have to
> use another mechanism
> to keep track of the minor version number.
>
> Thanks,
> Bill
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com 
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>   
_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user




More information about the perforce-user mailing list