Actions:
|
2011-11-17 17:28 AEST by Arthur Barrett - A user may be required to work on a particular branch, but they can
still 'attempt' to read any branch. If they do not 'know' which is the correct
branch to use they may spend a lot of time getting 'access denied' messages.
This enhancement allows the server administrator to set:
* branch for the anonymous user
* branch for a named user or group (eg CVSROOT/branchgroup)
The enhancement could be further adapter to either:
* force
* default
So 'force' is when the user specifies one branch or 'date' but the server
always overrides it with the 'forced' branch; and 'default' would be that the
server only supplies the branch if the user has not supplied one.
This affects:
* cvs log
* cvs rlog
* cvs diff
* cvs rdiff
* cvs co
* cvs export
* cvs up (sticky tag) |
|
2011-11-17 18:39 AEST by Arthur Barrett - Created an attachment (id=2262)
patch - simple to src/main.cpp and src/server.cpp
Here is a simple patch to show how it could be done. If you try a 'cvs co'
with no branch, it will successfully use the AnonForceBranch (if the current
user is AnonymousUsername), and if you try a 'cvs co -r branch' then it will
still use the same rule (ie: it will ignore the branch you asked for).
This can be 'worked around' by simlpy sending rubbish parameters to the server,
eg:
cvs co -d -r branch -d directory module
This will successfully checkout the 'Trunk' because the parameters are all
messed up.
The sticky code (cvs update) is not really complete, and not tested at all, and
there is nothing to handle attempted merges (eg: cvs up -j) which are
effectively a stealth checkout on another branch/tag.
This patch HAS NOT been committed.
|
|
2012-05-31 18:33 AEST by Arthur Barrett - I need to change this so that there is a new CVSROOT config file:
CVSROOT/anonusr
this will list all the usernames that are anonymous
The existing users file should now also have a force branch field
CVSROOT/users
|
|
2012-05-31 18:34 AEST by Arthur Barrett - Created an attachment (id=2410)
patch - awaiting merge then commit src/main.cpp & src/server.cpp
|
|
2012-10-09 13:44 AEST by Arthur Barrett - Created an attachment (id=2594)
patch to latest cvs suite 2010-4668
This patch uses registry/PServer settins:
* ForceBranch
* AnonForceBranch
The AnonForceBranch is probably OK, but really there should be a mapping file
like CVSROOT/branchgroup or CVSROOT/branchuser or CVSROOT/branchforce that maps
users/groups to branches with an (optional) field for 'default' or 'force':
anonuser:CVSNT_2_0_x:force
scott:CVSNT_BRANCH_2_5_03_2382:default
staff:HEAD:default
|
|
2012-10-09 14:25 AEST by Arthur Barrett - once there is a branchgroup or branchuser file then we also magically get to
force users at particular IP addresses to use a particult branch (or 'default'
branch). See bug 4767 for more information on mapping IP addresses to groups. |
|
2012-10-09 16:03 AEST by Arthur Barrett - Created an attachment (id=2595)
patch to latest cvs suite 2010-4668
Now supports CVSROOT/branch_force |
|
2019-11-28 19:44 AEST by Arthur Barrett - Note, this would be a nice way to allow ohloh.net (now openhub.net) to have anonymous access and get the
correct source fieles (the branch) and not simply read Trunk all the time:
https://www.openhub.net/p/cvsnt/commits/summary
I'm assuming there is nothing wrong with allowing 'cvs log' - that that wouldn't need to be restricted to a
branch. It's OK for people to 'see' what else has been committed (the comments) but not checkout.
Also need to test 'annotate' is handled just like checkout/update. Like 'diff' it's another back door. |