Merge branch '0.8.x' of https://github.com/appwrite/appwrite into feat-upgrade-php-version

This commit is contained in:
Torsten Dittmann committed 2021-04-23 17:06:42 +02:00
commit 3d960a2971
61 files changed
+994 -277

No files matched your search

+1 -1
View File
@@ -243,7 +243,7 @@ class Auth
*
* @return bool
*/
public static function isPreviliggedUser(array $roles): bool
public static function isPrivilegedUser(array $roles): bool
{
if(
array_key_exists('role:'.self::USER_ROLE_OWNER, $roles) ||
+3
View File
@@ -283,6 +283,9 @@ class MySQL extends Adapter
if (\is_array($prop['value'])) {
throw new Exception('Value can\'t be an array: '.\json_encode($prop['value']));
}
if (\is_bool($prop['value'])) {
$prop['value'] = (int) $prop['value'];
}
$st2->bindValue(':documentUid', $data['$id'], PDO::PARAM_STR);
$st2->bindValue(':documentRevision', $revision, PDO::PARAM_STR);
@@ -89,6 +89,12 @@ class Project extends Model
'default' => '',
'example' => '131102020',
])
->addRule('usersAuthLimit', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Max users allowed. 0 is unlimited.',
'default' => 0,
'example' => 100,
])
->addRule('platforms', [
'type' => Response::MODEL_PLATFORM,
'description' => 'List of Platforms.',
@@ -127,6 +133,7 @@ class Project extends Model
;
$providers = Config::getParam('providers', []);
$auth = Config::getParam('auth', []);
foreach ($providers as $index => $provider) {
if (!$provider['enabled']) {
@@ -150,6 +157,20 @@ class Project extends Model
])
;
}
foreach ($auth as $index => $method) {
$name = $method['name'] ?? '';
$key = $method['key'] ?? '';
$this
->addRule($key, [
'type' => self::TYPE_BOOLEAN,
'description' => $name.' auth method status',
'example' => true,
'default' => true,
])
;
}
}
/**