Automattic / Automattic/jetpack

Tiled gallery block: check for upload permissions

Open
#11,872 1 comment 0 reactions 0 assignees View on GitHub
[Block] Tiled Gallery [Feature] Tiled Gallery [Focus] Blocks [Pri] Low
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Tiled gallery block allows drop-uploading and uploading via the button below images.

image

We should check if the user has upload permissions before offering those methods. Otherwise, they can try but uploads would just fail.

See here how:
https://github.com/WordPress/gutenberg/blob/bcf55ff095fb9cbfee37aef24c422fbbf9661562/docs/data/data-core.md#hasuploadpermissions

Related to https://github.com/Automattic/wp-calypso/issues/28905

Contributor guide

Open the contributing guide

Research direction

Start at the Tiled gallery block's drop-upload and upload-button paths, then read the linked Gutenberg documentation for hasUploadPermissions. Confirm how the block currently offers these methods and verify that users without upload permission no longer see them, while permitted users retain both upload options.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
authorization, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.