In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001031 [In-Portal CMS] Data Management refactoring always 2011-04-03 11:16 2012-11-27 09:22
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.0-B1
Status closed Product Version 5.1.2 Target Version 5.2.0
Time EstimateNo estimate
Summary 0001031: User management internals refactoring
Description In-Portal has 2 sections, that are called "Users" and "Administrators". These sections are used to manage users and administrators. In fact both users and administrators are stored in a PortalUser table.

Only users who have set "admin" as their primary group are displayed under "Administrators" section. All other users are displayed under "Users" section. It works perfectly until regular In-Portal administrator wants to set another group (not "admin") as primary group for any of website administrators. At that moment that administrator suddenly is no longer displayed in "Administrators" section and is displayed in "Users" section.

This is bad, because user and administrator editing forms have a lot of differences. Also it's not obvious to an administrator, why he can't remove "admin" group from administrator's group list and add another group in it's place.

Proposition #1: distinguish admin or user not based on user's group, but based on new UserType field in PortalUser table (0 - user, 1 - admin, 2 - new ...).


Also, when "GroupId" virtual field is displayed on user registration form, then user will have selected group as primary instead of "Member" group. This way permission change in "Member" group won't have any effect on such users. This is a logical error, since "Member" group is specified in configuration variable called "Assign registered users to group". Then user is registered, but still isn't in "Member" group.

Proposition #2: add Member/admin group (id is retrieved from appropriate configuration variables) to user groups in session (not to UserGroup table) based on newly added PortalUser.UserType column after successful login.


Proposition #3:
Transform UserGroup.PrimaryGroup field into PortalUser.PrimaryGroupId. This way user's primary group will be stored in PortalUser.PrimaryGroupId (will be NULL by default).

Display "primary icon" on "Groups" tab during user/admin editing by comparing group id being printed to group id from user record. Also "Set Primary" functionality will be changed.
Additional Information
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-dev/oo24plIxkJg/discussion https://groups.google.com/d/topic/in-portal-dev/uaTOwx0vAMc/discussion
Change Log Message Moving UserGroup.PrimaryGroup field into PortalUser.PrimaryGroupId
Estimate Points 3
Attached Files patch file icon user_group_storage_core.patch [^] (44,053 bytes) 2011-07-07 10:51 [Show Content]
patch file icon user_group_storage_modules.patch [^] (8,127 bytes) 2011-07-07 10:51 [Show Content]
patch file icon user_group_storage_themes.patch [^] (2,534 bytes) 2011-07-07 10:51 [Show Content]
patch file icon user_group_storage_core_v2.patch [^] (50,490 bytes) 2011-07-07 12:59 [Show Content]
patch file icon user_group_storage_core_v2_513.patch [^] (45,980 bytes) 2012-11-27 09:21 [Show Content]
patch file icon user_group_storage_modules_513.patch [^] (10,459 bytes) 2012-11-27 09:22 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
parent of 0000907closed (5.1.3)alex In-Bulletin Tag "bb-post_PosterField" doesn't work with custom fields 
parent of 0000944closed (5.2.0)alex In-Portal CMS Ability for Users to subscribe to mailing during Registration 
parent of 0000941closed (5.1.2)alex In-Portal CMS Impossible to Subscribe to Newsletter 
parent of 0001078closed (5.1.3)alex In-Portal CMS Unsubscribing from mailing list doesn't delete all related user data 
parent of 0000823closed (5.1.2)alex In-Portal CMS User primary group isn't correctly set in session after it's login 
parent of 0001080closed (5.1.3)alex In-Portal CMS Users can register without password, when automatic passwords are turned off 
related to 0001095closed (5.1.3)alex In-Portal CMS Error messages are displayed on unrelated forms 
related to 0001202closed (5.2.0)alex In-Portal CMS Regular users are created instead of Admins 

-  Notes
User avatar (0003589)
alex (manager)
2011-07-07 04:19
edited on: 2011-07-07 08:08

Theme changes:

1. Virtual field "UserGroup" (used for primary group selection on Front-end registration form) is now called "PrimaryGroupId" and is real field now.
2. Hidden field "subscriber_email" added to "subscribe" and "unsubscribe" templates.

Please adjust your theme templates according to this.

User avatar (0003598)
alex (manager)
2011-07-07 10:57
edited on: 2011-07-07 13:02

Not obvious things, that was changed:
- "user_group" hidden field (on admin editing page) and related functionality removed in favor of new PrimaryGroupId field
- wrong icon name for "Set Primary" toolbar button, on users list template, was used
- identation of kEvent::CallSubEvent method fixed
- added "User_AdminGroup" configuration variable, to store admin group id (11 by default)

What to test:
- user registration (front-end); user registration (front-end) to custom group
- subscribe/unsubscribe to mailing list
- adding user/admin from admin console
- adding group to user/admin from admin console (user/admin editing screen)
- adding user/admin to group from admin console (group editing screen)
- changing user's/admin's primary group from admin console (user editing screen)
- "yes" display near proper primary group during group/user editing
- proper price is selected based on user's primary group on front-end

User avatar (0003599)
alex (manager)
2011-07-07 12:59

Will test later, but commit right now to ease merge process from 5.1.x branch.
User avatar (0003600)
alex (manager)
2011-07-07 13:00

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001031: User management internals refactoring
User avatar (0005075)
alex (manager)
2012-07-25 05:33

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r14437
Timestamp: 2011-07-07 13:00:21
Author: alex
Details ] Diff ]
Fixes 0001031: User management internals refactoring
mod - /in-portal/branches/5.2.x/admin/system_presets/simple/user_groups_g-ug.php Diff ] File ]
mod - /in-portal/branches/5.2.x/admin/system_presets/simple/user_groups_u-ug.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/users/admins_edit.tpl Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/users/admins_list.tpl Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/users/users_list.tpl Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/install_schema.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/constants.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/utility/event.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/user_helper.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/user_groups/user_groups_config.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/user_groups/user_groups_eh.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/users/users_config.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/users/users_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/users/users_item.php Diff ] File ]
Modules :: In-Commerce: 5.2.x r14436
Timestamp: 2011-07-07 11:03:27
Author: alex
Details ] Diff ]
Bug 0001031: User management internals refactoring
mod - /w/in-commerce/branches/5.2.x/units/orders/order_calculator.php Diff ] File ]
mod - /w/in-commerce/branches/5.2.x/units/pricing/pricing_event_handler.php Diff ] File ]
mod - /w/in-commerce/branches/5.2.x/units/products/products_event_handler.php Diff ] File ]
Themes :: Advanced: 1.2.x r14435
Timestamp: 2011-07-07 11:03:10
Author: alex
Details ] Diff ]
Bug 0001031: User management internals refactoring
mod - /themes/advanced/branches/1.2.x/platform/login/register.tpl Diff ] File ]
mod - /themes/advanced/branches/1.2.x/platform/mailing_list/subscribe.tpl Diff ] File ]
mod - /themes/advanced/branches/1.2.x/platform/mailing_list/unsubscribe.tpl Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-11-27 09:22 alex File Added: user_group_storage_modules_513.patch
2012-11-27 09:21 alex File Added: user_group_storage_core_v2_513.patch
2012-07-25 05:33 alex Note Added: 0005075
2012-07-25 05:33 alex Status resolved => closed
2012-02-06 03:31 alex Relationship added related to 0001202
2011-10-22 05:41 alex Estimate Points => 3
2011-08-10 05:11 alex Relationship added related to 0001095
2011-07-08 10:43 alex Target Version Icebox => 5.2.0
2011-07-08 06:29 alex Relationship added parent of 0001080
2011-07-07 13:02 alex Note Edited: 0003598 View Revisions
2011-07-07 13:00 alex Note Added: 0003600
2011-07-07 13:00 alex Status reviewed and tested => resolved
2011-07-07 13:00 alex Fixed in Version => 5.2.0-B1
2011-07-07 13:00 alex Resolution open => fixed
2011-07-07 13:00 alex Assigned To !COMMUNITY => alex
2011-07-07 13:00 alex Changeset attached 5.2.x r14437
2011-07-07 12:59 alex Note Added: 0003599
2011-07-07 12:59 alex Status needs testing => reviewed and tested
2011-07-07 12:59 alex File Added: user_group_storage_core_v2.patch
2011-07-07 11:03 alex Changeset attached 5.2.x r14436
2011-07-07 11:03 alex Changeset attached 1.2.x r14435
2011-07-07 10:57 alex Note Added: 0003598
2011-07-07 10:57 alex Assigned To => !COMMUNITY
2011-07-07 10:57 alex Developer => alex
2011-07-07 10:57 alex Status active => needs testing
2011-07-07 10:51 alex File Added: user_group_storage_themes.patch
2011-07-07 10:51 alex File Added: user_group_storage_modules.patch
2011-07-07 10:51 alex File Added: user_group_storage_core.patch
2011-07-07 09:58 alex Relationship added parent of 0000823
2011-07-07 09:21 alex Relationship added parent of 0001078
2011-07-07 08:53 alex Relationship added parent of 0000941
2011-07-07 08:08 alex Note Edited: 0003589 View Revisions
2011-07-07 07:39 alex Relationship added parent of 0000944
2011-07-07 07:38 alex Relationship replaced parent of 0000907
2011-07-07 07:37 alex Relationship added related to 0000907
2011-07-07 04:19 alex Note Added: 0003589
2011-04-03 11:16 alex New Issue
2011-04-03 11:16 alex Reference => https://groups.google.com/d/topic/in-portal-dev/oo24plIxkJg/discussion https://groups.google.com/d/topic/in-portal-dev/uaTOwx0vAMc/discussion
2011-04-03 11:16 alex Change Log Message => Moving UserGroup.PrimaryGroup field into PortalUser.PrimaryGroupId



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker