The default bug view has changed. See this FAQ.

Allow JS/UI code to list other users with access to the folder (list full ACL)

RESOLVED FIXED in Thunderbird 3.0rc1

Status

MailNews Core
Networking: IMAP
--
enhancement
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: BenB, Assigned: BenB)

Tracking

({fixed-seamonkey2.0.1})

Trunk
Thunderbird 3.0rc1
fixed-seamonkey2.0.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

(Assignee)

Description

8 years ago
I'd like to list the whole access list (ACL) of a folder in the folder properties dialog, including which other users have access to this folder and which rights each has.

We have this information in the backend, we just don't use it and don't have an IDL for it. This bug asks to implement that.

Attaching patch.
(Assignee)

Comment 1

8 years ago
Created attachment 406295 [details] [diff] [review]
Fix, v1
Attachment #406295 - Flags: review?(bienvenu)

Comment 2

8 years ago
Comment on attachment 406295 [details] [diff] [review]
Fix, v1

looks good in general.

need to rev the uuid.

+   * List all (human) users apart from the current user which have access to

s/which/who

+   * this folder. (List is not guaranteed to be complete.)

When will the list not be complete?
(Assignee)

Comment 3

8 years ago
> need to rev the uuid.

Done

> s/which/who

Done

> > (List is not guaranteed to be complete.)
> When will the list not be complete?

I don't know. I just didn't know whether the code guarantees it. I can remove that sentence.
Done

I also revised the description of the permission flags.
(Assignee)

Comment 4

8 years ago
Created attachment 406325 [details] [diff] [review]
Fix, v2

Fixed above feedback.

I had to do a full rebuild (because of the uuid rev) - make clean && make in mailnews/ and mail/ were not sufficient :(.
Attachment #406295 - Attachment is obsolete: true
Attachment #406325 - Flags: review?(bienvenu)
Attachment #406295 - Flags: review?(bienvenu)
(Assignee)

Comment 5

8 years ago
(before that, I got XPCOM errors when calling the new functions)

Comment 6

8 years ago
make -s tier_app in the obj-dir always does the trick for me...

Comment 7

8 years ago
Comment on attachment 406325 [details] [diff] [review]
Fix, v2

the patch is bit-rotted - it seems to have been made against a slightly out of date tree.

these two lines are a bit long - can you wrap them?

+static PLDHashOperator fillArrayWithKeys(const nsACString& key, const nsCString data, void* userArg)

+nsresult nsImapMailFolder::GetOtherUsersWithAccess(nsIUTF8StringEnumerator** aResult)

this needs to be NS_IMETHODIMP, not nsresult:

+nsresult nsImapMailFolder::GetPermissionsForUser(const nsACString& otherUser, nsACString& aResult)

r=me, with those fixed.
Attachment #406325 - Flags: review?(bienvenu) → review+
(Assignee)

Updated

8 years ago
Attachment #406325 - Flags: superreview?(bienvenu)
Attachment #406325 - Flags: approval-thunderbird3?
(Assignee)

Comment 8

8 years ago
Created attachment 406572 [details] [diff] [review]
Fix, v3 - new fresh yummy yummy, up-to-date to trunk
(Assignee)

Updated

8 years ago
Attachment #406572 - Flags: superreview?(bienvenu)
Attachment #406572 - Flags: approval-thunderbird3?
(Assignee)

Updated

8 years ago
Attachment #406325 - Attachment is obsolete: true
Attachment #406325 - Flags: superreview?(bienvenu)
Attachment #406325 - Flags: approval-thunderbird3?

Comment 9

8 years ago
Comment on attachment 406572 [details] [diff] [review]
Fix, v3 - new fresh yummy yummy, up-to-date to trunk

this still needs to be NS_IMETHODIMP

+nsresult nsImapMailFolder::GetOtherUsersWithAccess(nsIUTF8StringEnumerator** aResult)

and this should be wrapped:

+static PLDHashOperator fillArrayWithKeys(const nsACString& key, const nsCString data, void* userArg)


sr/a=me, with those comments addressed.
Attachment #406572 - Flags: superreview?(bienvenu)
Attachment #406572 - Flags: superreview+
Attachment #406572 - Flags: approval-thunderbird3?
Attachment #406572 - Flags: approval-thunderbird3+
(Assignee)

Comment 10

8 years ago
Created attachment 406580 [details] [diff] [review]
Fix, v4

Ops, sorry. Fixed.
Attachment #406572 - Attachment is obsolete: true
(Assignee)

Comment 11

8 years ago
Commited http://hg.mozilla.org/comm-central/rev/81f036d91636

Thunderbird on mozilla-central trunk
http://tinderbox.mozilla.org/showbuilds.cgi?tree=Thunderbird
is burning, though, because somebody decided to remove nsCStringArray (I just followed https://developer.mozilla.org/en/XPCOM_array_guide ).
Thunderbird 3.0 on Mozilla 1.9.1 is fine
http://build.mozillamessaging.com/tinderboxpushlog/?tree=Thunderbird3.0
so I'll care about this tomorrow.
(In reply to comment #11)
> so I'll care about this tomorrow.

Please, at least, tag the (SM & TB) builds...
Status: NEW → ASSIGNED
(Assignee)

Comment 13

8 years ago
Fixed, hopefully, in http://hg.mozilla.org/comm-central/rev/5b94dffb67e4

The NS_NewAdoptingUTF8StringEnumerator() API changed its second parameter from nsCStringArray in 1.9.1 to nsTArray<nsCString> in m-c, so I used an #ifdef.
(Assignee)

Comment 14

8 years ago
Created attachment 406677 [details] [diff] [review]
Fix crash in TB on m-c

The bustage fix was incomplete, I need to adapt the cast to the new array type as well. Without this patch, this causes TB on m-c to crash when accessing the new functions added here.
Attachment #406677 - Flags: review?
(Assignee)

Updated

8 years ago
Attachment #406677 - Flags: review? → review?(bugzilla)
Attachment #406677 - Flags: superreview+
Attachment #406677 - Flags: review?(bugzilla)
Attachment #406677 - Flags: review+
Attachment #406677 - Flags: approval-thunderbird3+
(Assignee)

Comment 15

8 years ago
Comment on attachment 406677 [details] [diff] [review]
Fix crash in TB on m-c

Checked in as http://hg.mozilla.org/comm-central/rev/3e7f71a517bf
(Assignee)

Comment 16

8 years ago
Comment on attachment 406677 [details] [diff] [review]
Fix crash in TB on m-c

Sorry, I meant http://hg.mozilla.org/comm-central/rev/b887790ca1f2
(Assignee)

Comment 17

8 years ago
FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0rc1

Updated

7 years ago
Keywords: fixed-seamonkey2.0.1
You need to log in before you can comment on or make changes to this bug.