Commit 59d50b8a authored by Tamlyn Rhodes's avatar Tamlyn Rhodes

Update authsome operations to HTTP verbs

parent 23ce013d
Pipeline #2581 passed with stage
in 3 minutes and 50 seconds
......@@ -8,7 +8,7 @@ import Navigation from '../Navigation/Navigation'
const AuthenticatedManage = ({children, ...props}) => (
<Manage nav={<Navigation />}>
<AuthenticatedComponent
operation='create'
operation='GET'
selector={(state) => state.collections[0]}
unauthorized={<p>You are not authorized to view this page.</p>}
{...props}
......
......@@ -30,12 +30,12 @@ export class Navigation extends React.Component {
<LinkContainer to='/manage/posts'>
<NavItem>Posts</NavItem>
</LinkContainer>
<Authorize operation='read' object='users'>
<Authorize operation='GET' object={{path: '/users'}}>
<LinkContainer to='/manage/users'>
<NavItem>Users</NavItem>
</LinkContainer>
</Authorize>
<Authorize operation='read' object='teams'>
<Authorize operation='GET' object={{path: '/teams'}}>
<LinkContainer to='/manage/teams'>
<NavItem>Teams</NavItem>
</LinkContainer>
......
......@@ -13,14 +13,13 @@ module.exports = {
teams: {
teamContributors: {
name: 'Contributors',
permissions: 'create'
permissions: 'POST'
},
teamCoauthors: {
name: 'Coauthors',
permissions: 'update'
permissions: 'PATCH'
}
},
'fail-redirect': '/login'
}
},
pubsweet: {
components: require('./components.json')
......
......@@ -15,14 +15,13 @@ module.exports = {
teams: {
teamContributors: {
name: 'Contributors',
permissions: 'create'
permissions: 'POST'
},
teamCoauthors: {
name: 'Coauthors',
permissions: 'update'
permissions: 'PATCH'
}
},
'fail-redirect': '/login'
}
},
pubsweet: {
components: require('./components.json')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment