File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
portal-ui/src/screens/Console/Buckets/ListBuckets Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 14
14
// You should have received a copy of the GNU Affero General Public License
15
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
17
- import { ISessionPermissions } from "../../types" ;
18
-
19
17
export const extractFileExtn = ( resourceStr : string ) => {
20
18
//file extensions may contain query string. so exclude query strings !
21
19
return ( resourceStr . match ( / \. ( [ ^ . ] * ?) (? = \? | # | $ ) / ) || [ ] ) [ 1 ] ;
22
20
} ;
23
21
export const getPolicyAllowedFileExtensions = (
24
- sessionGrants : ISessionPermissions ,
22
+ sessionGrants : Record < string , string [ ] > ,
25
23
uploadPath : string ,
26
24
scopes : string [ ] = [ ]
27
25
) => {
@@ -50,7 +48,7 @@ export const getPolicyAllowedFileExtensions = (
50
48
// The resource should not have the extensions (*.ext) for the hasPermission to work.
51
49
// so sanitize this and also use to extract the allowed extensions outside of permission check.
52
50
export const getSessionGrantsWildCard = (
53
- sessionGrants : ISessionPermissions ,
51
+ sessionGrants : Record < string , string [ ] > ,
54
52
uploadPath : string ,
55
53
scopes : string [ ] = [ ]
56
54
) => {
You can’t perform that action at this time.
0 commit comments