Merge branch 'oauth-admin-scope' into 'develop'

Added 'admin' & 'push' OAuth scopes

See merge request pleroma/admin-fe!69
This commit is contained in:
Maxim Filippov 2019-12-11 09:08:32 +00:00
commit fdff6a4d96
4 changed files with 4 additions and 2 deletions

View file

@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- **breaking** PleromaFE login feature relies on `admin` scope presence in PleromaFE token (older versions of PleromaFE don't support it)
- Moves emoji pack configuration from the main menu to settings tab, redesigns it and fixes bugs
- `mailerEnabled` must be set to `true` in order to require password reset (password reset currently only works via email)
- Remove fetching initial data for configuring server settings

View file

@ -8,7 +8,7 @@ export async function loginByUsername(username, password, authHost) {
const verifyHost = user.authHost === authHost
const data = {
'token_type': 'Bearer',
'scope': 'read write follow',
'scope': 'read write follow push admin',
'refresh_token': 'foo123',
'me': 'bob',
'expires_in': 600,

View file

@ -9,7 +9,7 @@ export async function loginByUsername(username, password, authHost) {
data: {
client_name: `AdminFE_${Math.random()}`,
redirect_uris: `${window.location.origin}/oauth-callback`,
scopes: 'read write follow'
scopes: 'read write follow push admin'
}
})

View file

@ -41,6 +41,7 @@
<el-button :loading="loading" class="login-button" type="primary" @click.native.prevent="handleLogin">
{{ $t('login.logIn') }}
</el-button>
<!-- Note: PleromaFE login feature relies on admin scope presence in PleromaFE token (older versions of PleromaFE don't support it) -->
<el-button v-if="pleromaFEToken" :loading="loadingPleromaFE" class="login-button" type="primary" @click.native.prevent="handlePleromaFELogin">
{{ $t('login.logInViaPleromaFE') }}
</el-button>