From 43dd5c6c2b3c718cfb0dff3e94afa4fa86e8dab8 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 12 Jan 2020 01:13:55 +0200 Subject: [PATCH] Fixed OAuth issue --- .gitignore | 3 ++- app/config/roles.php | 2 +- app/controllers/api/account.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0494e8fba..b227c06be 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /tests/resources/storage/ /.idea/ .DS_Store -.php_cs.cache \ No newline at end of file +.php_cs.cache +.env \ No newline at end of file diff --git a/app/config/roles.php b/app/config/roles.php index c30570e36..399ab9737 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -75,7 +75,7 @@ return [ ], ROLE_OWNER => [ 'label' => 'Owner', - 'scopes' => array_merge($admins, []), + 'scopes' => array_merge($logged, $admins, []), ], ROLE_APP => [ 'label' => 'Application', diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 4fae49c57..043c4cde6 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -436,8 +436,8 @@ $utopia->get('/v1/account/sessions/oauth/callback/:provider/:projectId') ->desc('OAuth Callback') ->label('error', __DIR__.'/../../views/general/error.phtml') ->label('scope', 'public') - ->label('abuse-limit', 50) - ->label('abuse-key', 'ip:{ip}') + //->label('abuse-limit', 50) + //->label('abuse-key', 'ip:{ip}') ->label('docs', false) ->param('projectId', '', function () { return new Text(1024); }, 'Project unique ID') ->param('provider', '', function () use ($providers) { return new WhiteList(array_keys($providers)); }, 'OAuth provider')