Skip to content

Commit 7207d61

Browse files
committed
fix type
1 parent d5e6ec1 commit 7207d61

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

portal-ui/src/screens/Console/Buckets/ListBuckets/UploadPermissionUtils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import { ISessionPermissions } from "../../types";
18-
1917
export const extractFileExtn = (resourceStr: string) => {
2018
//file extensions may contain query string. so exclude query strings !
2119
return (resourceStr.match(/\.([^.]*?)(?=\?|#|$)/) || [])[1];
2220
};
2321
export const getPolicyAllowedFileExtensions = (
24-
sessionGrants: ISessionPermissions,
22+
sessionGrants: Record<string, string[]>,
2523
uploadPath: string,
2624
scopes: string[] = []
2725
) => {
@@ -50,7 +48,7 @@ export const getPolicyAllowedFileExtensions = (
5048
// The resource should not have the extensions (*.ext) for the hasPermission to work.
5149
// so sanitize this and also use to extract the allowed extensions outside of permission check.
5250
export const getSessionGrantsWildCard = (
53-
sessionGrants: ISessionPermissions,
51+
sessionGrants: Record<string, string[]>,
5452
uploadPath: string,
5553
scopes: string[] = []
5654
) => {

0 commit comments

Comments
 (0)