stop generating privileged packaged apps for 'hello world'

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
2 months ago

People

(Reporter: eviljeff, Assigned: wenzel)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Project|New app|Hello World produces a privileged packaged app rather than a standard web type.  

This is bad because privileged apps can only be distributed by Marketplace (no self hosting; no 3rd party stores) and the Marketplace review is slower as those approvals are restricted to a limited number of extra trusted reviewers.

Comment 1

3 years ago
(In reply to Andrew Williamson [:eviljeff] from comment #0)
> Project|New app|Hello World produces a privileged packaged app rather than a
> standard web type.  

 Project|New app|Hello World  standard web app, but it is missing 
 "developer": {
     "name": "Your name",  
   "url": "http://example.com"   
}

Developers who are developing for first time, sometimes find it difficult to upload in the marketplace. While uploading to marketplace without developer name in manifest it wont accept. So in Hello world template these should be included.

In some cases in order to avoid it, many reps suggest developers in their talks to use 
Project|New app|Privileged Empty App

While creates a additional lines 
 "type": "privileged", 
 "permissions": {},

Where many will not be using privileged API's but since it is in WebIDE template they ll keep it without removing.

> This is bad because privileged apps can only be distributed by Marketplace
> (no self hosting; no 3rd party stores) and the Marketplace review is slower
> as those approvals are restricted to a limited number of extra trusted
> reviewers.

As Eviljeff said it is taking so long time and many young developers feel it uneasy. The better solution will be 

To remove two things
1) Hello world template
2) In Privileged Empty App

  We can remove additional lines 
     "type": "privileged", 
     "permissions": {},

So we will have one template for Privileged Apps and another for standard webapps.

Or else we can remove  Privileged Empty App and can add another one line in Hello World app
"developer": {
     "name": "Your name",  
   "url": "http://example.com"   
}

I feel first one will be a better option.

Updated

3 years ago
Flags: needinfo?(sole)
Flags: needinfo?(jryans)
We made them privileged from the start so people would have less issues when they actually added the 'permissions' bit.

Although probably the "hello world" template doesn't need that.

However I haven't been working on this for some months already, this is something that someone from apps should look at. CC:ing Fred so he can figure out who :-)
Flags: needinfo?(sole) → needinfo?(fwenzel)
(Reporter)

Comment 3

3 years ago
I would have thought the CSP restrictions that being privileged adds (remote scripts, eval parsing, etc) would cause more issues for a new developer than permissions not working.
(Assignee)

Comment 4

3 years ago
WebIDE isn't my project, and I have no one assigned to it anymore over here.

But in the interest of stopping passing the buck, I can take a look at this myself; I was playing with templates anyway this week.
Assignee: nobody → fwenzel
Flags: needinfo?(fwenzel)
OS: Windows 7 → All
Hardware: x86_64 → All

Comment 5

3 years ago
Are all templates privileged? If so, indeed, at least one should be not privileged.



Viswaprasath, you're saying you want to remove 2 templates? I'm not sure to understand what you're suggesting. Which templates are missing the "developer" field? Only HelloWorld?
(Reporter)

Comment 6

3 years ago
(In reply to Paul Rouget [:paul] from comment #5)
> Are all templates privileged? If so, indeed, at least one should be not
> privileged.

yes.  The two labelled privileged in the description, and also the basic 'hello world' one.
I would agree that it seems reasonable to remove the "privileged" type from the most basic "Hello World" template.
Flags: needinfo?(jryans)
(Assignee)

Comment 8

3 years ago
(In reply to Paul Rouget [:paul] from comment #5)
> Viswaprasath, you're saying you want to remove 2 templates? I'm not sure to
> understand what you're suggesting. Which templates are missing the
> "developer" field? Only HelloWorld?

That's a different bug from this one, too.
(Assignee)

Updated

3 years ago
See Also: → bug 1156550
(Assignee)

Comment 9

3 years ago
(In reply to Fred Wenzel [:wenzel] from comment #8)
> (In reply to Paul Rouget [:paul] from comment #5)
> > Viswaprasath, you're saying you want to remove 2 templates? I'm not sure to
> > understand what you're suggesting. Which templates are missing the
> > "developer" field? Only HelloWorld?
> 
> That's a different bug from this one, too.

I filed bug 1156550.
(Assignee)

Comment 11

3 years ago
I did roll this into the same PR after all. Can I get a quick review on this?
(Assignee)

Comment 12

3 years ago
Okay reviewed and landed (thanks tofumatt).

Now to deploy.
To generate the entire directory contents with the json file and all I built this project: https://github.com/sole/mortar-devtools

Perhaps it should be moved to /mozilla/ !

The git submodules need to be updated to point to the latest version of each template, and then you run node build.js and it generates a /dist/ folder with the zips and a JSON that can be uploaded to the CDN.
(Assignee)

Comment 14

3 years ago
Thanks, very convenient! Can you transfer the repo?
(Assignee)

Updated

3 years ago
Flags: needinfo?(sole)
Done! Sorry this bug slipped my radar. Hope all the permissioning went well. GitHub transfers are always  a bit traumatic ;-)
Flags: needinfo?(sole)
(Assignee)

Comment 16

3 years ago
(In reply to Soledad Penades [:sole] [:spenades] from comment #15)
> Hope all the permissioning went well.

Seems like it, thank you.
(Assignee)

Comment 17

3 years ago
I generated the new package and deployed it along with a new JSON file to the CDN.

It appears to not work yet; I think we need to give the CDN some time to expire.
(Assignee)

Comment 18

3 years ago
(In reply to Fred Wenzel [:wenzel] from comment #17)
> It appears to not work yet

Oops, by that I mean the WebIDE still appears to run off the old code.
(Assignee)

Comment 19

3 years ago
Confirmed updated code shows up in WebIDE.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

2 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.