Changed the messaging API to allow you to provide a parameter
that will cause the code to check if the sender of the message
has the correct permissions before the message is sent.
The ajax messaging (message button on profile page) has been
updated to perform these permission checks. This brings it
inline with the existing private message page.
1) The core 'item_tagged' class was renamed to 'tag_added'.
2) The core 'item_untagged' class was renamed to 'tag_removed'.
3) The core 'message_read' class was renamed to 'message_viewed'.
4) The mod_forum 'userreport_viewed' class was renamed to 'user_report_viewed'.
5) The report_outline 'activity_viewed' was renamed to 'activity_report_viewed'.
6) The report_outline 'outline_viewed' was renamed to 'report_viewed'.
When a messaging output is set to forced, users should not be able to change
that. Regression intoroduced in bb3546f3 made possible to change checkboxes
(but not avoid forced settings). This fix replace checkboxes for 'forced'
settings with the corresponding message, similar to how it worked for
disallowed before.
The new messaging default settings can be set in messages.php and deployed
during installation. This also ensures the removing of settings on plugin
uninstallation and contains the update script to populate current default
settings on the existing system when the new feature is introduced.
For security reason we have to avoid using library functions in upgrade
function, so we set defaults the blind way. At this point we do not expect
plugins to have individual messaging defaults presets anyway. The site
defaults are the same as were set for each user using
message_set_default_message_preferences function.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
Existing user messaging preferences should accomodate default settings and
permissions. This also includes some changes to default outputs preferences.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
This introduces the new page where admin may change the permissions and
defaults for particular combination of message processors and providers.
Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>