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

Same permission are shown twice #405

Closed
gloomy-ghost opened this issue May 22, 2017 · 8 comments
Closed

Same permission are shown twice #405

gloomy-ghost opened this issue May 22, 2017 · 8 comments

Comments

@gloomy-ghost
Copy link

Describe the problem and steps to reproduce it:

Go to https://addons.mozilla.org/en-US/firefox/addon/disqus-undirect/
Click "Permissions"

What happened?

Two permissions are the same
default

What did you expect to happen?

There should only be one permission

@andymckay
Copy link

/cc @eviljeff

@eviljeff
Copy link
Member

Yeah we don't do any de-duping at the moment and *://disqus.com/* is in both permissions and content_scripts.

@wagnerand
Copy link
Member

Mentor: @eviljeff

If this is your first contribution, please refer to https://wiki.mozilla.org/Add-ons/Contribute/Code on how to get started.

@apoorvaeternity
Copy link

apoorvaeternity commented Jun 20, 2017

@eviljeff
I am new to open source.
Where should I look to fix this issue?
I mean what files do I have to modify.

@eviljeff
Copy link
Member

@apoorvaeternity There are a few ways to solve this, but the simplest, (I think), that doesn't require lots of changes and re-parsing existing manifests is to change https://github.com/mozilla/addons-server/blob/master/src/olympia/files/models.py#L434:L435 so duplicates are filtered out.

Then it will need a test to prove it works. One very similar to https://github.com/mozilla/addons-server/blob/master/src/olympia/files/tests/test_models.py#L312 but with some duplicates. You could probably just add some duplicates into the permissions list in that test, actually.

@apoorvaeternity
Copy link

@eviljeff Okay I am working on it.

@apoorvaeternity
Copy link

@eviljeff I have made a pull request.
If it gets accepted it will be my first contribution to open source.

@vcarciu
Copy link

vcarciu commented Jun 23, 2017

Verified as fixed on -dev :
doubleperm

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

No branches or pull requests

8 participants