-------------------------------------------------------
#!/bin/sh
listFile=$1
list=`cat ${CVSROOT}/CVSROOT/${listFile}`
for user in $list
do
if [ "${CVS_USER}" = "${user}" ];
then
exit 0;
fi
done
echo "User ${CVS_USER} is not allowed to commit to this resource"
exit 1;
-------------------------------------------------------
The script works but if the user is denied, the message from the echo does not get sent back to the user. Instead, the user gets the error:
-------------------------------------------------------
The server reported an error while performing the "cvs commit" command.
MyProject: cvs commit: warning: commitinfo line contains no format strings:
MyProject: "/var/lib/cvs/myrepository/CVSROOT/grant- access.sh admin-list.txt"
MyProject: Appending defaults (" %r/%p %s"), but please be aware that this usage is
MyProject: deprecated.
MyProject: cvs commit: Pre-commit check failed
MyProject: cvs [commit aborted]: correct above errors first!
--------------------------------------------------------
This error is not very informative to the user. Is there a way have the grant-access.sh script generate a message that CVS sends back to the user?
Thanks!
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
==================================================================
_______________________________________________ info-cvs mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/info-cvs
