1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

chaning default permission case to restrict access

This commit is contained in:
Jamie Hewitt 2021-05-26 16:25:22 +03:00
parent 5bcc111d5c
commit d021b25d98
2 changed files with 3 additions and 4 deletions

View File

@ -20,10 +20,10 @@ export default function Permission({
getData()
}, [eventType, accountId])
console.log('eventType', eventType)
if (data === false) {
if (data === true) {
return <>{children}</>
} else {
const message = `Sorry, you don't have permission to ${eventType}. Please make sure you are logged in.`
return <Alert title="Permission denied" text={message} state="error" />
} else {
return <>{children}</>
}
}

View File

@ -6,7 +6,6 @@ export default async function rbacRequest(
address: string
): Promise<boolean> {
const url = appConfig.rbacUrl
console.log('address', address)
if (url === 'false') {
return true
} else {