Ability to access Disabled Section with Direct Link

11 views
Skip to first unread message

Dmitry A.

unread,
Apr 26, 2011, 8:52:28 PM4/26/11
to in-por...@googlegroups.com
Hi everyone,


Often these days we need to have an ability to access a disabled Section or Category Item on the Front-end without having it shown in the list among other Enabled Sections or Category Items.

There is a beautiful solution that Google Picasa has for this - Direct URL which contains some "key" for authenticating the user and showing him hidden by default content.

Example:

https://picasaweb.google.com/dandrejev/MaksikGitara?authkey=Gv1sRgCJeZqfiPxL271

I propose we implement the same for Section (later for Category Items).

Interface:

1. If Status is Pending or Disabled we show a new "Access with Link" field right after (below) that Status field
2. New "Access with Link" field will have a Check-box (enabled by default) and a Label field (which can be copied) with full URL to that Section.

Functionality:

1. We would need to have 2 new DB fields ( in Categories table (and later for Category Items) to store the Status and the Authentication Key. I suggest calling them as AllowAccessWithLink and AuthKey, but I am insisting on these names.

2. Let's use some random Alpha-numeric (case sensitive) algorithms (nothing fancy) to generate (automatically) and save this keys. Keys will NOT change! Suggested length 15-20 chars.

3. One of hard questions is - which of the URLs to show:
a. with ModRewrite or without - I believe it should be based on current website settings
b. which language - default one for Front-end

4. Need to make sure if In-Portal performs a URL redirect due to forcing the HTML URL when user visits without one we need to keep AuthKey in URL as well.


I know we might need todo some changes in the ModRewrite and Caching part, but I strongly believe it's a MUST for us to have this.



Cheers!


DA

Alexander Obuhovich

unread,
May 4, 2011, 8:01:48 PM5/4/11
to in-por...@googlegroups.com
It's like Picasa album functionality (https://picasaweb.google.com/aik.bold/Blogger?authkey=Gv1sRgCP7qwrLcyYmq2gE#), where you can give access to private album with a direct link.


From technical viewpoint it will be pretty easy to implement:
  1. create 2 fields in a Category table: DirectLinkEnabled (Yes/No) and DirectLinkAuthKey
  2. when someone enables direct link functionality (on category/section editing page), then
    • random alpha-numeric string will be generated and stored in category/section record
    • link to that page with freshly generated authentication key will be displayed
  3. in checkItemStatus method (where check is made to prevent viewing Pending/Disabled categories/sections) also check is authentication key is present in url and it matches one from current category/section record
  4. if all matches, then show category/section and don't redirect to "no permission" page as usual in this case

If there will be a need, then such approach could be applied to any category item or any page on the site.

Alexander Obuhovich

unread,
May 4, 2011, 8:03:07 PM5/4/11
to in-por...@googlegroups.com
Dmitry do you have task created for this functionality?

Dmitry A.

unread,
May 4, 2011, 10:23:35 PM5/4/11
to in-por...@googlegroups.com
Hi Alex,


Thanks for looking at this. Here is a new task for this feature:

1050: Ability to access Disabled Section with Direct Link


DA

Dmitry A.

unread,
Jul 22, 2011, 3:47:15 PM7/22/11
to in-por...@googlegroups.com
Hi guys,


Looks like I have found a bug in this functionality (committed to In-Portal 5.2.0 branch).

Access URL gets some junk (ie. admin=1 and so on) if Section is accessed via Content Mode (clicked Section Properties) see "Access-WithLink-URL-2011-07-22_1441.png".

Not major issue, but needs to be fixed.


DA
Access-WithLink-URL-2011-07-22_1441.png

Phil -- wbtc.fr --

unread,
Jul 22, 2011, 4:38:05 PM7/22/11
to in-por...@googlegroups.com
good catch

2011/7/22 Dmitry A. <dand...@gmail.com>

Dmitry A.

unread,
Sep 11, 2011, 9:45:31 PM9/11/11
to in-por...@googlegroups.com
Here is a patch for this issue - provided by Alex.

Patch is tested successfully!


DA
keep_section_properties_link_clean.patch

Phil -- wbtc.fr --

unread,
Sep 12, 2011, 6:58:15 AM9/12/11
to in-por...@googlegroups.com
nice :)

2011/9/12 Dmitry A. <dand...@gmail.com>

Dmitry A.

unread,
Jun 3, 2012, 2:01:46 AM6/3/12
to in-por...@googlegroups.com
Looks like we have a little bug/issue with this functionality.

In some rare cases (but possible) we can have Admin installed on separate sub-domain or location then main website. Current newly developed here functionality would use that sub-domain and NOT URL/domain of the main website.

Example



while should have been



Also, who don't we do similar for all Category Items (links, articles, topics) - simple and useful, what you think?



DA

Phil

unread,
Jun 3, 2012, 2:19:38 AM6/3/12
to in-por...@googlegroups.com
I think it could be useful, as it'd let admin subdomain unknown from people who are receiving the direct link.


Envoyé avec Sparrow

Alexander Obuhovich

unread,
Jun 3, 2012, 4:48:18 AM6/3/12
to in-por...@googlegroups.com
What about site-domains? If administrator would also login to that different domain then we have no other choice but to always build link to primary website domain from config.php file.

Dmitry A.

unread,
Jun 3, 2012, 12:45:36 PM6/3/12
to in-por...@googlegroups.com
Hi Alex,

Yes, good point, but I think we can draw a line here and have ONLY Primary domain which is specified in config.php

One other idea is to have s drop-down with sub-domains next to the actual field or something, but I personally don't think it's necessary at this point.

DA

Dmitry A.

unread,
Jun 9, 2012, 12:27:08 PM6/9/12
to in-por...@googlegroups.com
PING

Alexander Obuhovich

unread,
Jun 11, 2012, 7:42:39 AM6/11/12
to in-por...@googlegroups.com
I've created a separate task http://tracker.in-portal.org/view.php?id=1311 for fixing that issue.


On Sat, Jun 9, 2012 at 7:27 PM, Dmitry A. <dand...@gmail.com> wrote:
PING

Alexander Obuhovich

unread,
Jun 11, 2012, 12:30:35 PM6/11/12
to in-por...@googlegroups.com
Here is patch with a fix, ready for testing.
direct_link_https_fix.patch
Reply all
Reply to author
Forward
0 new messages