The save() method in the creativecommons.class.php calls the is_available() method to see if the license is enabled, and if not it aborts the save(). The admin should be restricted in this way. Further, such checks shouldn't be the concern of the save() method, but of the input validation code earlier on. If some internal code wants to call save() for a license that isn't allowed for users, that should be possible. The users won't see it but the data will be recorded (as expected when calling the function).

Attached is a patch the still sets a Drupal error message, but doesn't abort the save(). It also outputs the error message only once in a row, instead of repeatedly. It's against 1.x-dev, without the other patches I've sent having been applied.

CommentFileSizeAuthor
allow-saves.patch4.51 KBturadg

Comments

turadg’s picture

Assigned: Unassigned » turadg
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.