added the commitable field to a project
This commit is contained in:
@ -17,6 +17,7 @@ CREATE TABLE project (
|
||||
name VARCHAR(255) UNIQUE NOT NULL,
|
||||
summary VARCHAR(255) NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
commitable CHAR(1) NOT NULL DEFAULT 'Y',
|
||||
|
||||
createdon DATETIME NOT NULL,
|
||||
updatedon DATETIME NOT NULL,
|
||||
|
@ -3,17 +3,17 @@
|
||||
REPOBASE="`basename "${1}"`"
|
||||
USER="${2}"
|
||||
|
||||
ans="`wget -q -O- "%API%/projectHasMember/${REPOBASE}/${USER}" 2>/dev/null`"
|
||||
ans="`wget -q -O- "%API%/projectIsCommitable/${REPOBASE}/${USER}" 2>/dev/null`"
|
||||
[ "${ans}" = "YES" ] && exit 0
|
||||
|
||||
[ "${ans}" = "NO" ] && {
|
||||
echo "-------------------------------------------------------------" >&2
|
||||
echo " ${USER} is not a member of ${REPOBASE}" >&2
|
||||
echo " ${REPOBASE} is read-only or ${USER} is not a member of ${REPOBASE}" >&2
|
||||
echo "-------------------------------------------------------------" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "---------------------------------------------------------------------" >&2
|
||||
echo " Failed to check membership of ${REPOBASE} for ${USER}" >&2
|
||||
echo " Failed to check commitability of ${REPOBASE} for ${USER}" >&2
|
||||
echo "---------------------------------------------------------------------" >&2
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user