2

Is it possible to enable my users to create Perforce stream depots without giving them super access everywhere?

I just upgraded to Perforce Server 2011.1 and I am eager to use the new streams feature.

If I understand correctly, streams have a couple restrictions: 1) streams must be in special stream depots and 2) stream depots contain branches at their top-level.

We currently have a single local depot (called "mylocaldepot") which contains multiple projects. Given the above restrictions and in keeping with the practices shown in Perforce documentation, it would seem that "one stream depot per project" is more sensible. But creating depots requires super access. It would be more convenient if our users could freely create stream depots for their projects themselves. But I don't want to give everyone unrestricted super access everywhere. And I don't want them to accidentally delete our existing local depot.

Is it possible to setup Perforce permissions in such a way that users can be granted only the ability to create stream depots? Perhaps I could use p4 protect and some combination of permission settings like this?

write user * * //...
super user * * //*
super user * * -//mylocaldepot

BTW: I've found the best information on streams to be these two videos: Introduction to Streams and Streams for Codeline Management; and this document: Perforce Streams Adoption Guide

Xavier T.
  • 40,509
  • 10
  • 68
  • 97
jwfearn
  • 28,781
  • 28
  • 95
  • 122

2 Answers2

1

The super user must create the depot, but ordinary users can then create streams in that depot. You should definitely not give all your users super permission, and you should not need more than one (or, perhaps, a few) stream depot.

Bryan Pendleton
  • 16,128
  • 3
  • 32
  • 56
  • 1
    In all the Perforce documentation and video examples, they use one-stream-depot-per-project and it looks like trying to shoehorn multiple, unrelated projects into a single stream-depot might be confusing at best (would they be treated as wildly different branches of the same stream?) We have many users working on many different projects. Are you sure we could get by with a single stream-depot? – jwfearn Jan 24 '12 at 00:43
  • I agree, there is an appeal to having separate projects in separate depots. By "many" projects, do you mean 10? or 500? It seems reasonable to me to create several (3? 5? 10?) project-specific stream depots, and let your teams create streams within them. – Bryan Pendleton Jan 24 '12 at 03:56
  • Note that the ordinary users will require "p4 protect" access to //depot//... in order to copy files into their new stream. (Which may seem obvious, but if like me you inherited folder-based protections you may be surprised.) – yoyo Jul 14 '14 at 21:49
1

You could also look into using the Perforce Broker to provide a project creation command. The broker can, behind the scenes, do the necessary steps to create a new stream depot, while not granting super access to the users. (The broker would need to be able to use a super account, of course, but that would be hidden from the users.)

randy-wandisco
  • 3,649
  • 16
  • 11