Bug 443561 - FEAT: Match the new db schema of bz3.0 [#5 TABLE group_group_map]
Summary: FEAT: Match the new db schema of bz3.0 [#5 TABLE group_group_map]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Hardware Catalog
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: XINSUN
QA Contact: Yu Shao
URL:
Whiteboard:
Depends On:
Blocks: hwcert->BZ3_tracker
TreeView+ depends on / blocked
 
Reported: 2008-04-22 08:25 UTC by XINSUN
Modified: 2008-08-04 17:56 UTC (History)
10 users (show)

Fixed In Version: 3.2rh-20080801.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-04 17:56:31 UTC
Embargoed:


Attachments (Terms of Use)
The patch to fix : 5.1 Delete the field isbless from table group_group_map (7.86 KB, patch)
2008-04-25 05:01 UTC, XINSUN
no flags Details | Diff
Patch improve: (10.13 KB, patch)
2008-04-29 10:42 UTC, XINSUN
no flags Details | Diff
Patch Improve: (9.60 KB, patch)
2008-04-29 15:34 UTC, XINSUN
no flags Details | Diff

Description XINSUN 2008-04-22 08:25:09 UTC
5.   Relate to TABLE group_group_map need to change list below:
         5.1 Delete  the field isbless from table group_group_map
                          Added :     N/A
                          Removed:    FIELD  group_group_map.isbless

Comment 1 XINSUN 2008-04-25 05:01:18 UTC
Created attachment 303736 [details]
The patch to fix : 5.1 Delete  the field isbless from table group_group_map

derive_groups () is used in the token.cgi, but seems the catalog didn't use
this cgi, so remove it simply.

UserCanBlessGroup() is used in the editusers.cgi and userprefs.cgi which didn't
exist in catalog, so remove it simply.

can_bless() is used in the template file :
"template/en/default/global/useful-links.html.tmpl" :

[% ' | <a href="editusers.cgi">Users</a>'     IF user.groups.editusers ||
user.can_bless %]  

but it is not used in the catalog, so remove it simply.

Best Regards!
Nicho

Comment 2 Noura El hawary 2008-04-28 05:19:17 UTC
Hi nicho ,

Patch looks good,, maybe it is a good idea also to remove code that calls the 2
subroutines that you removed from User.pm derive_groups() and can_bless(), as
you mentioned before it is in the following places for your quick reference:

./token.cgi:257:    $user->derive_groups;
./token.cgi:300:            $user->derive_groups;

./template/en/default/global/useful-links.html.tmpl:75:                        
                     || user.can_bless %]

Cheers,
Noura

Comment 3 XINSUN 2008-04-29 10:42:31 UTC
Created attachment 304097 [details]
Patch improve:

Remove below:
./token.cgi:257:    $user->derive_groups;
./token.cgi:300:	    $user->derive_groups;

./template/en/default/global/useful-links.html.tmpl:75: 		       

		     || user.can_bless %]

Pls review

Nicho

Comment 4 XINSUN 2008-04-29 15:34:36 UTC
Created attachment 304133 [details]
Patch Improve:

Comment 5 Noura El hawary 2008-05-01 02:00:31 UTC
Patch looks good, Thanks Nicho

Noura

Comment 6 Rob Landry 2008-07-17 21:03:18 UTC
Please commit this change to CVS and set the status to MODIFIED.

Comment 7 eric_liu 2008-08-01 11:38:34 UTC
tested and run good 


Note You need to log in before you can comment on or make changes to this bug.