Closed Bug 365616 Opened 18 years ago Closed 18 years ago

CalDAV provider should allow autologin

Categories

(Calendar :: Provider: CalDAV, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: browning, Unassigned)

Details

Attachments

(1 file, 2 obsolete files)

Code was recently added to the ICS provider which causes it to automatically log in to remote calendars if stored credentials are available. It seems a good idea to keep this kind of behavior broadly consistent across ICS and CalDAV providers, so the CalDAV should allow autologin as well.
mostly cut&paste to move the auth prompt impl from calICSCalendar.js to calUtils.js, thought there's also a new promptAuth func for nsIAuthPrompt2
Attachment #250141 - Flags: first-review?(lilmatt)
Comment on attachment 250141 [details] [diff] [review]
move auth prompt impl to calUtils.js, add autologin to calDavCalendar.js

Since we have this chance to do a little anonymous function cleanup without hosing cvs blame, let's do so.  Please be sure to wrap the function's parameters appropriately after adding the function name.

>Index: calendar/base/src/calUtils.js
>===================================================================
>+
>+/**
>+ * Auth prompt impl
>+ */
Let's spell out "implementation" here.

>+calAuthPrompt.prototype = {
>+    prompt: function(aDialogTitle, aText, aPasswordRealm, aSavePassword,
>+                     aDefaultText, aResult) {
Anonymous function:  Perhaps function capP( ?

>+    getPasswordInfo: function(aPasswordRealm) {
Anonymous function:  Perhaps function capGPI( ?

>+    promptUsernameAndPassword: function(aDialogTitle, aText, aPasswordRealm,
>+                                        aSavePassword, aUser, aPwd) {
Anonymous function:  Perhaps function capPUAP( ?

>+    promptAuth: function promptAuth(aChannel, aLevel, aAuthInfo) {
Anonymous function:  Perhaps function capPA( ?

>+    promptPassword: function(aDialogTitle, aText, aPasswordRealm,
>+                             aSavePassword, aPwd) {
Anonymous function:  Perhaps function capPP( ?


Otherwise this looks fine. r=lilmatt with those nits addressed.

I'd like jminta to do r2 as I'd like to get his signoff on what makes it into calUtils.js and what doesn't.
Attachment #250141 - Flags: first-review?(lilmatt) → first-review+
Attached patch unanonymize functions in moved code (obsolete) — — Splinter Review
changes per r1
Attachment #250141 - Attachment is obsolete: true
Attachment #250661 - Flags: second-review?(jminta)
Attached patch remove redundant returns — — Splinter Review
patch modified pursuant to recent changes in bug 343721
Attachment #250661 - Attachment is obsolete: true
Attachment #251198 - Flags: second-review?(jminta)
Attachment #250661 - Flags: second-review?(jminta)
Comment on attachment 251198 [details] [diff] [review]
remove redundant returns

In an ideal world we'd have more documentation about what calAuthPrompt is. r2=jminta though
Attachment #251198 - Flags: second-review?(jminta) → second-review+
Patch checked in on MOZILLA_1_8_BRANCH and trunk (with a slightly more verbose comment).

-> FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [litmus testcase wanted]
Flags: in-litmus?
Whiteboard: [litmus testcase wanted]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: