1
0
Fork 0
mirror of synced 2024-07-02 05:00:33 +12:00

Merge branch 'feat-git-integration' of https://github.com/appwrite/appwrite into feat-git-integration

This commit is contained in:
Bradley Schofield 2023-08-20 14:27:43 +01:00
commit 1f32b2f6f6
No known key found for this signature in database
GPG key ID: CDDF1217D7D66C9D
5 changed files with 13 additions and 8 deletions

View file

@ -631,6 +631,11 @@ return [
'description' => 'Host is not trusted. Add a custom domain to your project first.',
'code' => 404,
],
Exception::ROUTER_DOMAIN_NOT_CONFIGURED => [
'name' => Exception::ROUTER_DOMAIN_NOT_CONFIGURED,
'description' => 'Please configure domain environment variables before using Appwrite outside of localhost.',
'code' => 500,
],
Exception::RULE_RESOURCE_NOT_FOUND => [
'name' => Exception::RULE_RESOURCE_NOT_FOUND,
'description' => 'Resource could not be found. Check resourceId and resourceType.',

View file

@ -61,7 +61,6 @@ return [
Auth::USER_ROLE_GUESTS => [
'label' => 'Guests',
'scopes' => [
'none',
'public',
'home',
'console',
@ -77,22 +76,22 @@ return [
],
Auth::USER_ROLE_USERS => [
'label' => 'Users',
'scopes' => \array_merge($member, [ 'none' ]),
'scopes' => \array_merge($member),
],
Auth::USER_ROLE_ADMIN => [
'label' => 'Admin',
'scopes' => \array_merge($admins, [ 'none' ]),
'scopes' => \array_merge($admins),
],
Auth::USER_ROLE_DEVELOPER => [
'label' => 'Developer',
'scopes' => \array_merge($admins, [ 'none' ]),
'scopes' => \array_merge($admins),
],
Auth::USER_ROLE_OWNER => [
'label' => 'Owner',
'scopes' => \array_merge($member, $admins, [ 'none' ]),
'scopes' => \array_merge($member, $admins),
],
Auth::USER_ROLE_APPS => [
'label' => 'Applications',
'scopes' => ['health.read', 'graphql', 'none'],
'scopes' => ['health.read', 'graphql'],
],
];

View file

@ -60,7 +60,7 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
$mainDomain = App::getEnv('_APP_DOMAIN', '');
if ($mainDomain === 'localhost') {
throw new AppwriteException(AppwriteException::GENERAL_SERVER_ERROR, 'Please configure domain environment variables before using Appwrite outside of localhost.');
throw new AppwriteException(AppwriteException::ROUTER_DOMAIN_NOT_CONFIGURED);
} else {
throw new AppwriteException(AppwriteException::ROUTER_HOST_NOT_FOUND);
}

View file

@ -186,7 +186,7 @@ const APP_AUTH_TYPE_ADMIN = 'Admin';
// Response related
const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB
// Function headers
const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length'];
const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host'];
const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length'];
// Usage metrics
const METRIC_TEAMS = 'teams';

View file

@ -195,6 +195,7 @@ class Exception extends \Exception
/** Router */
public const ROUTER_HOST_NOT_FOUND = 'router_host_not_found';
public const ROUTER_DOMAIN_NOT_CONFIGURED = 'router_domain_not_configured';
/** Proxy */
public const RULE_RESOURCE_NOT_FOUND = 'rule_resource_not_found';