In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
399 [In-Portal CMS] Front End feature request always 2009-10-18 16:13 2012-07-25 05:32
Dmitry  
alex  
normal  
closed 5.1.0  
fixed  
 
none 5.2.0-B1  
https://groups.google.com/d/topic/in-portal-dev/ZfCLO4FbDi0/discussion
Added SSL and Login Required check-boxes for Sections
1
0000399: SSL + Login Required options for Sections
I propose to add SSL + Login Required options for Sections (non-templates - they have tags).

This can be done in the way of check-box
related to 0001189closed  (5.2.0)alex Site domain with empty "SSL Url" field is always matched as current on secure connection 
patch page_login_ssl_redirect_feature_core.patch (9,850) 2012-01-04 03:28
http://tracker.in-portal.org/file_download.php?file_id=1461&type=bug
patch page_login_ssl_redirect_feature_themes.patch (807) 2012-01-04 03:28
http://tracker.in-portal.org/file_download.php?file_id=1462&type=bug
Issue History
2012-07-25 05:32 alex Note Added: 0005001
2012-07-25 05:32 alex Status resolved => closed
2012-01-04 03:35 alex Note Added: 0004384
2012-01-04 03:35 alex Status reviewed and tested => resolved
2012-01-04 03:35 alex Fixed in Version => 5.2.0-B1
2012-01-04 03:35 alex Resolution open => fixed
2012-01-04 03:35 alex Assigned To !COMMUNITY => alex
2012-01-04 03:35 alex Changeset attached 5.2.x r14978
2012-01-04 03:29 alex Changeset attached 1.2.x r14977
2012-01-04 03:29 alex Note Added: 0004383
2012-01-04 03:29 alex Status needs testing => reviewed and tested
2012-01-04 03:29 alex Assigned To alex => !COMMUNITY
2012-01-04 03:29 alex Developer => alex
2012-01-04 03:29 alex Status needs work => needs testing
2012-01-04 03:28 alex File Added: page_login_ssl_redirect_feature_themes.patch
2012-01-04 03:28 alex File Added: page_login_ssl_redirect_feature_core.patch
2012-01-04 03:26 alex Relationship added related to 0001189
2012-01-03 18:04 Dmitry Note Edited: 0004358 bug_revision_view_page.php?bugnote_id=0004358#r955
2011-12-29 18:24 Dmitry Note Added: 0004358
2011-12-29 18:24 Dmitry Assigned To Dmitry => alex
2011-10-22 05:27 alex Estimate Points => 1
2011-10-16 18:00 Dmitry Note Added: 0004055
2011-10-16 18:00 Dmitry Assigned To => Dmitry
2011-10-16 18:00 Dmitry Status active => needs work
2011-10-16 18:00 Dmitry Target Version Icebox => 5.2.0
2011-09-27 13:00 Dmitry Change Log Message => Added SSL and Login Required check-boxes for Sections
2011-09-27 12:59 Dmitry Reference => https://groups.google.com/d/topic/in-portal-dev/ZfCLO4FbDi0/discussion
2010-08-31 14:25 alex version => 5.1.0
2009-10-21 03:47 alex Note Edited: 0000943 bug_revision_view_page.php?bugnote_id=0000943#r296
2009-10-21 03:46 alex Note Edited: 0000943 bug_revision_view_page.php?bugnote_id=0000943#r295
2009-10-21 03:46 alex Note Edited: 0000943 bug_revision_view_page.php?bugnote_id=0000943#r294
2009-10-21 03:41 alex Note Added: 0000943
2009-10-18 16:14 Dmitry Description Updated bug_revision_view_page.php?rev_id=290#r290
2009-10-18 16:13 Dmitry New Issue

Notes
(0000943)
alex   
2009-10-21 03:41   
(edited on: 2009-10-21 03:47)
Code at top of each design template used:
<inp2:m_if check="st_Field" name="RequireLogin" db="db">
    <inp2:m_RequireLogin login_template="my_account/login_register" />
</inp2:m_if>
<inp2:m_if check="st_Field" name="RequireSSL" db="db">
    <inp2:m_CheckSSL mode="required"/>
</inp2:m_if>
<inp2:m_CheckSSL/>

Database queries:

ALTER TABLE Category
    ADD RequireSSL TINYINT NOT NULL DEFAULT '0',
    ADD RequireLogin TINYINT NOT NULL DEFAULT '0',
    ADD INDEX (RequireSSL),
    ADD INDEX (RequireLogin);

Code on section edit template:
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="c" field="RequireSSL" title="la_fld_RequireSSL"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="c" field="RequireLogin" title="la_fld_RequireLogin"/>

Code in unit config (fields):
'RequireSSL' => Array (
    'type' => 'int',
    'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
    'not_null' => 1, 'default' => 0
),
'RequireLogin' => Array (
    'type' => 'int',
    'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
    'not_null' => 1, 'default' => 0
),

Code in unit config (columns):
'RequireSSL' => Array( 'title' => 'la_col_RequireSSL','filter_block' => 'grid_options_filter'),
'RequireLogin' => Array( 'title' => 'la_col_RequireLogin','filter_block' => 'grid_options_filter'),

Of course code in template include theme-specific login-required template path.

(0004055)
Dmitry   
2011-10-16 18:00   
Moved to 5.2.0 due to popularity.
(0004358)
Dmitry   
2011-12-29 18:24   
(edited on: 2012-01-03 18:04)
Please add this to 5.2.0.

This functionality has been reviewed by me in Mybodymybest project (can be taken from there) and implementation can be taken from there.

Projects SVN Revision 2144

NOTES:

1. NEW checkboxes to be added after "Access with Link" field on Section Edit
2. HIDE all new fields for Simple Preset.

(0004383)
alex   
2012-01-04 03:29   
Will test all together later.
(0004384)
alex   
2012-01-04 03:35   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0000399: SSL + Login Required options for Sections
(0005001)
alex   
2012-07-25 05:32   
Since 5.2.0 version was released.