Closed Bug 653180 Opened 13 years ago Closed 13 years ago

[webby] Store http auth credentials for staging servers

Categories

(Webtools Graveyard :: Elmo, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: stas)

References

Details

Attachments

(1 file, 3 obsolete files)

...and show them to the logged-in users.

This way we don't have to send the creds out via emails to individual localizers.
Attached patch Patch (obsolete) — Splinter Review
+ some SQL to run:

alter table `webby_project` add `stage_login` varchar(80);
alter table `webby_project` add `stage_passwd` varchar(80);
Assignee: nobody → stas
Attachment #528652 - Flags: review?(gandalf)
Forgot to mention: this patch is created based on the playdoh branch, as we will most likely move to it in the next couple of hours.
Comment on attachment 528652 [details] [diff] [review]
Patch

check if the user is logged in
Attachment #528652 - Flags: review?(gandalf) → review-
Attached patch grrr, new patch (obsolete) — Splinter Review
I remembered to put this in, and didn't, in the end.  Here's the updated patch.
Attachment #528652 - Attachment is obsolete: true
Attachment #528661 - Flags: review?(gandalf)
Comment on attachment 528661 [details] [diff] [review]
grrr, new patch

Review of attachment 528661 [details] [diff] [review]:

good one!
Attachment #528661 - Flags: review?(gandalf) → review+
Comment on attachment 528661 [details] [diff] [review]
grrr, new patch

I wonder if the stage URL could include the user name and password for logged-in users?
Attached patch Add migration data (obsolete) — Splinter Review
Peter suggested that I use schematic migrations to deal with the sql.
Attachment #528661 - Attachment is obsolete: true
Attachment #528809 - Flags: review?(peterbe)
Comment on attachment 528809 [details] [diff] [review]
Add migration data

Review of attachment 528809 [details] [diff] [review]:

r=me
Attachment #528809 - Flags: review?(peterbe) → review+
As suggested by Axel, this adds the stage_auth_url field.  It's the simplest approach, I know I could have probably leveraged stage_url and insert the credentials into it, but since we're only adding projects every couple of weeks, I figured that the benefit wasn't worth putting any more time into this.
Attachment #528809 - Attachment is obsolete: true
Attachment #528858 - Flags: review?(l10n)
Comment on attachment 528858 [details] [diff] [review]
Add stage_auth_url field

Review of attachment 528858 [details] [diff] [review]:

r=me with the permission nit.

::: apps/webby/templates/webby/project.html
@@ +99,5 @@
     <li><a href="{{project.verbatim_url}}">Verbatim</a></li>
     <li><a href="{{project.l10n_repo_url}}">L10n repository</a></li>
     <li><a href="{{project.code_repo_url}}">Project repository</a></li>
+    <li>
+      {% if perms.webby.change_weblocale and project.stage_auth_url %}

Reading views.py, it seems that add_weblocale is the localizer permission, and change_weblocale is the admin permission. Should be add_locale, thus.
Attachment #528858 - Flags: review?(l10n) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: 653553
Axel and I have tested this on /test/, and I would like to deploy this patch on production asap, before we switch to playdoh.  This is slightly more involved, so I filed a follow-up bug 653553.
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: