Show a warning when viewing a non-public add-on
See original GitHub issueDescribe 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:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, that’d be nice.
Yes, the minimum is to have some padding below the second notification.
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)