Closed Bug 127318 Opened 23 years ago Closed 23 years ago

Need to push UserInGroup to templates

Categories

(Bugzilla :: Bugzilla-General, defect, P1)

2.15
x86
Linux
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: bbaetz, Assigned: bbaetz)

Details

Attachments

(1 file)

The sidebar xul stuff fails because UserInGroup is not pushed to the template.
This should be added globally so that other templates can use it (although they
should be caching it for speed reasons)
-> me, patch coming, 2.16 blocker.
Assignee: justdave → bbaetz
Keywords: patch, review
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.16
Attached patch patchSplinter Review
Comment on attachment 70976 [details] [diff] [review]
patch

>Index: globals.pl
>+    # UserInGroup - you probably want to cache this....\

Got an extra '\' in there that should probably go :)

Other than that, r=jake x2

PS, sidebar/xul.tmpl only calls this once per group so it doesn't need a cache.
Attachment #70976 - Flags: review+
Why are we doing this in templates?  I would say in all situations the security
stuff should be done before sending to the template.
Status: NEW → ASSIGNED
Its not security stuff per se. The sidebar needs to know whterh to show the
edit* links, just like the footer does. This keeps the idea of what we're
searching for closer to the template - theres no need to use indirection just
for the sake of indirection.

I agree that security settings and stuff like what fields to show on enter_bug
belong in the perl, not the template, but thats not the issue here. Once
commandmenu is templatised, then this would also use that, which is why its in
globals and not sidebar.cgi.
I'll leave this for a couple of days, see what other people think, before
committing.
In which case shouldn't the links be moved into a separate template?
No. for the footer, they are separated by html tags, and the sidebar uses xul.
Sure, we could pass in pre/post params, and do it that way, but I think that
thats excessive.
justdave didn't have a problem with this; checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: