public function assignDefaults($ResetDefaults = false)
{
if (count($this->DefaultPermissions)) {
if ($ResetDefaults) {
$this->DefaultPermissions = array();
} else {
return;
}
}
$this->addDefault(RoleModel::TYPE_GUEST, array('Garden.Activity.View' => 1, 'Garden.Profiles.View' => 1));
$this->addDefault(RoleModel::TYPE_UNCONFIRMED, $Permissions = array('Garden.SignIn.Allow' => 1, 'Garden.Activity.View' => 1, 'Garden.Profiles.View' => 1, 'Garden.Email.View' => 1));
$this->addDefault(RoleModel::TYPE_APPLICANT, $Permissions = array('Garden.SignIn.Allow' => 1, 'Garden.Activity.View' => 1, 'Garden.Profiles.View' => 1, 'Garden.Email.View' => 1));
$this->addDefault(RoleModel::TYPE_MODERATOR, $Permissions = array('Garden.SignIn.Allow' => 1, 'Garden.Activity.View' => 1, 'Garden.Curation.Manage' => 1, 'Garden.Moderation.Manage' => 1, 'Garden.PersonalInfo.View' => 1, 'Garden.Profiles.View' => 1, 'Garden.Profiles.Edit' => 1, 'Garden.Email.View' => 1));
$this->addDefault(RoleModel::TYPE_ADMINISTRATOR, array('Garden.SignIn.Allow' => 1, 'Garden.Settings.View' => 1, 'Garden.Settings.Manage' => 1, 'Garden.Community.Manage' => 1, 'Garden.Users.Add' => 1, 'Garden.Users.Edit' => 1, 'Garden.Users.Delete' => 1, 'Garden.Users.Approve' => 1, 'Garden.Activity.Delete' => 1, 'Garden.Activity.View' => 1, 'Garden.Messages.Manage' => 1, 'Garden.PersonalInfo.View' => 1, 'Garden.Profiles.View' => 1, 'Garden.Profiles.Edit' => 1, 'Garden.AdvancedNotifications.Allow' => 1, 'Garden.Email.View' => 1, 'Garden.Curation.Manage' => 1, 'Garden.Moderation.Manage' => 1));
$this->addDefault(RoleModel::TYPE_MEMBER, array('Garden.SignIn.Allow' => 1, 'Garden.Activity.View' => 1, 'Garden.Profiles.View' => 1, 'Garden.Profiles.Edit' => 1, 'Garden.Email.View' => 1));
// Allow the ability for other applications and plug-ins to speak up with their own default permissions.
$this->fireEvent('DefaultPermissions');
}