diff --git a/services/settings/pkg/store/defaults/defaults.go b/services/settings/pkg/store/defaults/defaults.go index 6e7b463f6b..39108d97bd 100644 --- a/services/settings/pkg/store/defaults/defaults.go +++ b/services/settings/pkg/store/defaults/defaults.go @@ -33,6 +33,13 @@ const ( // LanguageReadWriteName is the hardcoded setting name for the language read write permission LanguageReadWriteName string = "language-readwrite" + // DisableEmailNotificationsPermissionID is the hardcoded setting UUID for the language read write permission + DisableEmailNotificationsPermissionID string = "ad5bb5e5-dc13-4cd3-9304-09a424564ea8" + // DisableEmailNotificationsPermissionName is the hardcoded setting name for the language read write permission + DisableEmailNotificationsPermissionName string = "disable-email-notifications" + // DisableEmailNotificationsPermissionDisplayName is the hardcoded setting name for the language read write permission + DisableEmailNotificationsPermissionDisplayName string = "Disable Email Notifications" + // SetPersonalSpaceQuotaPermissionID is the hardcoded setting UUID for the set personal space quota permission SetPersonalSpaceQuotaPermissionID string = "4e6f9709-f9e7-44f1-95d4-b762d27b7896" // SetPersonalSpaceQuotaPermissionName is the hardcoded setting name for the set personal space quota permission @@ -75,6 +82,8 @@ const ( // SettingUUIDProfileLanguage is the hardcoded setting UUID for the user profile language SettingUUIDProfileLanguage = "aa8cfbe5-95d4-4f7e-a032-c3c01f5f062f" + // SettingUUIDProfileDisableNotifications is the hardcoded setting UUID for the disable notifications setting + SettingUUIDProfileDisableNotifications = "33ffb5d6-cd07-4dc0-afb0-84f7559ae438" // AccountManagementPermissionID is the hardcoded setting UUID for the account management permission AccountManagementPermissionID string = "8e587774-d929-4215-910b-a317b1e80f73" @@ -169,6 +178,21 @@ func generateBundleAdminRole() *settingsmsg.Bundle { }, }, }, + { + Id: DisableEmailNotificationsPermissionID, + Name: DisableEmailNotificationsPermissionName, + DisplayName: DisableEmailNotificationsPermissionDisplayName, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, + Id: SettingUUIDProfileDisableNotifications, + }, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, + }, + }, + }, { Id: AccountManagementPermissionID, Name: AccountManagementPermissionName, @@ -426,6 +450,21 @@ func generateBundleSpaceAdminRole() *settingsmsg.Bundle { }, }, }, + { + Id: DisableEmailNotificationsPermissionID, + Name: DisableEmailNotificationsPermissionName, + DisplayName: DisableEmailNotificationsPermissionDisplayName, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, + Id: SettingUUIDProfileDisableNotifications, + }, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, + }, + }, + }, { Id: SelfManagementPermissionID, Name: SelfManagementPermissionName, @@ -502,6 +541,21 @@ func generateBundleUserRole() *settingsmsg.Bundle { }, }, }, + { + Id: DisableEmailNotificationsPermissionID, + Name: DisableEmailNotificationsPermissionName, + DisplayName: DisableEmailNotificationsPermissionDisplayName, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, + Id: SettingUUIDProfileDisableNotifications, + }, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, + }, + }, + }, { Id: SelfManagementPermissionID, Name: SelfManagementPermissionName, @@ -578,6 +632,21 @@ func generateBundleGuestRole() *settingsmsg.Bundle { }, }, }, + { + Id: DisableEmailNotificationsPermissionID, + Name: DisableEmailNotificationsPermissionName, + DisplayName: DisableEmailNotificationsPermissionDisplayName, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, + Id: SettingUUIDProfileDisableNotifications, + }, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, + }, + }, + }, }, } } @@ -603,6 +672,16 @@ func generateBundleProfileRequest() *settingsmsg.Bundle { }, Value: &languageSetting, }, + { + Id: SettingUUIDProfileDisableNotifications, + Name: "disable email notifications", + DisplayName: "Disable Email Notifications", + Description: "Disable email notifications", + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, + }, + Value: &settingsmsg.Setting_BoolValue{BoolValue: &settingsmsg.Bool{Default: false, Label: "disable notifications"}}, + }, }, } }