real.protect #2

  • //
  • guest/
  • matt_albrecht/
  • scripts/
  • protect/
  • real.protect
  • View
  • Commits
  • Open Download .zip Download (3 KB)
#=============================================================================
# Sample protections file
#=============================================================================

# Define the IP addresses that will be used for this entire file.  This
# assumes a class A network.
{ globalip = 10.1.[1,2,3].* }


#-----------------------------------------------------------------------------
# First, restrict anyone who doesn't have an account from creating a user.
{
type=user
ip=*
-//...
}
    list *

#-----------------------------------------------------------------------------
# All registered users can see the entire depot, except the meta-data where
# we archive the Perforce meta-data.
{
type=group
name=all     # this is a group that contains all other groups and users.
access=read
}
    //...
    -//depot/p4-meta-data/...


#-----------------------------------------------------------------------------
# The branch offices can see the files only from behind the proxy, and has
# limited access to writing the files.
{
name=remote
type=group
ip=proxy-67.112.[1-128].* & proxy-192.168.1.*
//depot/
}
    write       -//depot/...
    read 	...
    write       branch-offices/...


#-----------------------------------------------------------------------------
# Where we keep the tracker
{}
    write group tracker //depot/tracker/...
    
#-----------------------------------------------------------------------------
# Give group owners access to only the meta-data files that they need.
{
type=group
access=write
//depot/p4-meta-data/groups/
}
    owner_dev       owner_dev.spec
    owner_dev       dev.spec
    owner_dev       dev_*.spec
    owner_branch    owner_branch.spec
    owner_branch    branch_*.spec

#-----------------------------------------------------------------------------
# Allow developers access to the main branch, sorted by sub-project access.
{
access=write
type=group
//depot/main/
}
    dev         ...
    dev_c       c/...
    dev_java    java/...
    dev_doc     docs/...
    dev_web     html/...
    dev_web     cgi-bin/...

    
#-----------------------------------------------------------------------------
# Give access to the branches to only those who need it.
{
access=write
type=group
//depot/branch-
}
    branch_1_0   1.0/...
    branch_1_2   1.2/...
    branch_2_0   2.0/...

#-----------------------------------------------------------------------------
# Finally, setup the administrators
{
access=super
//...
}
    group admins
    user margret

# Also, the administrators need access on the local Perforce machine
{
access=super
ip=127.0.0.1
//...
}
    group admins
    user margret
# Change User Description Committed
#2 4674 Matt Albrecht Fix some regular expressions in the scripts.
#1 4670 Matt Albrecht Add multiple IP addess range listings in the "ip" line, and a
       sample file.