Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage Emulator Security Rules: Use of ternary operator not allowed #5370

Closed
dbc-dev opened this issue Dec 27, 2022 · 1 comment · Fixed by #5398
Closed

Storage Emulator Security Rules: Use of ternary operator not allowed #5370

dbc-dev opened this issue Dec 27, 2022 · 1 comment · Fixed by #5398

Comments

@dbc-dev
Copy link

dbc-dev commented Dec 27, 2022

[REQUIRED] Environment info

firebase-tools:
11.19.0

Platform:
macOS

[REQUIRED] Test case

Using ternary operators inside the storage.rules file outputs a warning. A similar issue was reported and fixed 2 years ago for Firestore rules.

[REQUIRED] Steps to reproduce

  1. In the storage.rules file write any ternary expression (e.g allow read: if true ? true : false;)
  2. Run Storage Emulator firebase emulators:start

[REQUIRED] Expected behavior

According to the documentation the ternary operator is allowed for both Cloud Firestore & Cloud Storage.

[REQUIRED] Actual behavior

⚠ Use of ternary operator not allowed in (...)/storage.rules:(line)

@dbc-dev dbc-dev added the bug label Dec 27, 2022
@tonyjhuang tonyjhuang self-assigned this Dec 28, 2022
@dalgarins
Copy link

right now the linter in the firebase console is disabled is related with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants