|
@@ -99,6 +99,12 @@ class LuticateSettingsBusiness extends LuBusiness {
|
99
|
99
|
return $setting;
|
100
|
100
|
}
|
101
|
101
|
|
|
102
|
+ public static function getEffectiveSettingValue($user_id, $setting_name)
|
|
103
|
+ {
|
|
104
|
+ $setting = self::getEffectiveSetting($user_id, $setting_name);
|
|
105
|
+ return $setting["Value"];
|
|
106
|
+ }
|
|
107
|
+
|
102
|
108
|
public static function getAllEffectiveSetting($user_id)
|
103
|
109
|
{
|
104
|
110
|
return LuticateSettingsDataAccess::getAllEffectiveSetting($user_id)->map(function($value)
|
|
@@ -111,12 +117,18 @@ class LuticateSettingsBusiness extends LuBusiness {
|
111
|
117
|
|
112
|
118
|
public static function get($setting_name)
|
113
|
119
|
{
|
114
|
|
- $perm = LuticateSettingsDataAccess::getByName($setting_name);
|
115
|
|
- if (is_null($perm)) {
|
|
120
|
+ $setting = LuticateSettingsDataAccess::getByName($setting_name);
|
|
121
|
+ if (is_null($setting)) {
|
116
|
122
|
self::notFound("Permission not found");
|
117
|
123
|
}
|
118
|
|
- $perm->setValue(json_decode($perm->getValue()));
|
119
|
|
- return $perm;
|
|
124
|
+ $setting->setValue(json_decode($setting->getValue()));
|
|
125
|
+ return $setting;
|
|
126
|
+ }
|
|
127
|
+
|
|
128
|
+ public static function getValue($setting_name)
|
|
129
|
+ {
|
|
130
|
+ $setting = self::get($setting_name);
|
|
131
|
+ return $setting->getValue();
|
120
|
132
|
}
|
121
|
133
|
|
122
|
134
|
/**
|