Bug 443561

Summary: FEAT: Match the new db schema of bz3.0 [#5 TABLE group_group_map]
Product: [Retired] Red Hat Hardware Certification Program Reporter: XINSUN <xisun>
Component: Hardware CatalogAssignee: XINSUN <xisun>
Status: CLOSED CURRENTRELEASE QA Contact: Yu Shao <yshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: bxu, dkl, efeng, kbaker, nelhawar, rlandry, tfu, xiqin, ykun, yshao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.2rh-20080801.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-04 17:56:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 443456    
Attachments:
Description Flags
The patch to fix : 5.1 Delete the field isbless from table group_group_map
none
Patch improve:
none
Patch Improve: none

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