question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show a warning when viewing a non-public add-on

See original GitHub issue

Describe the problem and steps to reproduce it:

As an admin, log in to AMO and view the detail page for a disabled add-on

or

As a developer, upload an add-on, make it non-public, log in to AMO and view its detail page

What happened?

You see a complete detail page as if nothing was different

What did you expect to happen?

You should see a warning saying that the add-on is not public but you’re seeing it anyway because you have elevated privileges.

Anything else we should know?

This has created confusion a couple of times from admins or developers who are not expecting to see a public listing.

It should be pretty easy to fix:

diff --git a/src/amo/components/Addon/index.js b/src/amo/components/Addon/index.js
index a2d4eec21..52e2b4d4e 100644
--- a/src/amo/components/Addon/index.js
+++ b/src/amo/components/Addon/index.js
@@ -53,6 +53,7 @@ import Card from 'ui/components/Card';
 import Icon from 'ui/components/Icon';
 import LoadingText from 'ui/components/LoadingText';
 import ShowMoreCard from 'ui/components/ShowMoreCard';
+import Notice from 'ui/components/Notice';
 
 import './styles.scss';
 
@@ -537,6 +538,11 @@ export class AddonBase extends React.Component {
                 reason={compatibility.reason}
               />
             ) : null}
+            {addon && addon.status !== 'public' ? (
+              <Notice type="error">
+                {i18n.gettext('This is not a public listing. You are only seeing it because of elevated permissions.')}
+              </Notice>
+            ) : null}
             <header className="Addon-header">
               {this.headerImage({ compatible: isCompatible })}
 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
willdurandcommented, Aug 18, 2018

Do we want both errors?

Yes, that’d be nice.

Do we care about styles here?

Yes, the minimum is to have some padding below the second notification.

0reactions
ioanarusiczkicommented, Aug 30, 2018

I’m adding that the message is also available for developers before the add-ons are auto-approved or approved by admins. Verified on AMO stage with FF61(Win10)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get a warning icon when I add a reference to an MEF ...
When I create a test Console App project and add a project reference to the plugin project, I get a warning icon (yellow...
Read more >
How to Quickly Fix Mixed Content Warnings (HTTPS/SSL)
Mixed content warnings are common after an HTTPS migration or adding a new service. Check out how to quickly fix these on your...
Read more >
Viewing and updating Dependabot alerts - GitHub Docs
To just view closed alerts, click Closed. Screenshot showing the "Closed" option. Click the alert that you would like to view or update....
Read more >
How to view Kodi Log Files and Fix Common Errors
Go back to the program addons list and click Log Viewer for Kodi again. This time, click Run, then Show Log. How to...
Read more >
Set a Data Quality Warning - Tableau Help
To see the details of the warning, hover over the warning icon with the cursor. Data quality warning tooltip on Tableau Desktop. Data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found