Better task security

Review Request #203 - Created March 13, 2012 and submitted - Latest diff uploaded

Information
Adrian Budau
infoarena
Reviewers
hackers
Modified the security for tasks. Before it was just a property(hidden) which was true or false. This led to hard-codings and surprises(users could add contest problems in user-round). Now security works as for textblocks.
1) Private tasks, tasks which can only be seen by their owner or an admin/intern
2) Protected tasks, task which can be seen but can not be used by normal-users in user-rounds. These tasks can have tags which will not be seen by normal users. (Thus allowing us to set tags for a problem before the contest without trouble).
3) Public tasks which are basically problems which can be found in archives. 

Tasks are made private when a round is waited, protected when the round starts and public when they are added to archives. They also become protected when removed from all archive rounds.
Also made some lint fixes(lines over 80 chars, removing ?> etc)

Also fixed a cache crash regarding the rating property of a task not being inserted into the task array on creation.
Made a contest. Private tasks became protected. Stopped it. Protected tasks became private.
Tried adding a protected task(by force using the chrome browser "inspect element") which ended in an error.
Also tried searching by tags -> protected and private tasks do not appear.
Loading...