Restricted user rules not applied to updated signup
Status: Abandoned
Brought to you by:
jshaver
In an existing signup for a restricted user
("hard_account_expiration" set to false), the signup
rules are not fully applied during an update to that
signup. I first noticed that a restricted user could make
a legal signup (along with a double-bookable resource),
but then could update that signup to change it to
whatever time they pleased, even if it broke the rules
for a restricted account (ie. must be booked for same
time slot as a double-bookable resource).
Logged In: YES
user_id=713937
A few thoughts:
(1) update now has code which tests for hard-enforecement of
rules and stops an update if those rules are broken. If a
test of the double-booking rules is added in the same place
(in update) then it can utilize the same logic (just assign
a $warning if the rule is broken) and the update will be
automatically rejected
(2) in addition to the rejection currently in place (and the
one suggested above), there should ALSO be a test in
validatesignups. This allows us to later add "hard-enforce"
to individual rules of which account restriction could be
normally "on".
(3) could the logic which is used to make sure a restricted
account has the necessary double-bookings be moved into a
function? This would greatly simplify the test. It could be
set up to be called with only a usn (thus testing all
signups for validity) or with a usn and a signup # (thus
testing for only that one signup)?