Skip to content

Commit cc49fac

Browse files
authored
PXP-11040: add more options to Discovery page isAuthorized check (#1380)
* PXP-11040: add more options to Discovery page isAuthorized check
1 parent 6016616 commit cc49fac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Discovery/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ const DiscoveryWithMDSBackend: React.FC<{
114114
} else {
115115
authMapping = props.userAuthMapping;
116116
}
117-
const isAuthorized = userHasMethodForServiceOnResource('read', '*', study[authzField], authMapping);
117+
const isAuthorized = userHasMethodForServiceOnResource('read', '*', study[authzField], authMapping)
118+
|| userHasMethodForServiceOnResource('read', 'peregrine', study[authzField], authMapping)
119+
|| userHasMethodForServiceOnResource('read', 'guppy', study[authzField], authMapping)
120+
|| userHasMethodForServiceOnResource('read-storage', 'fence', study[authzField], authMapping);
118121
if (supportedValues?.accessible?.enabled && isAuthorized === true) {
119122
accessible = AccessLevel.ACCESSIBLE;
120123
} else if (supportedValues?.unaccessible?.enabled && isAuthorized === false) {

0 commit comments

Comments
 (0)