




FlexCMS eNews 
To subscribe to our enewsletter, please enter your email address in the box below and click the "Subscribe" button.
Note: You may easily remove yourself from the newsletter list at any time by following the instructions included with every mailing.  |
|
|  |

Home > FlexCMS Support Forum > User Help > General Support Requests > Article permission level

FlexCMS Support Forum


Article permission level Started February 13, 2008 @ 12:45pm by David
 |
Post Message |
|
|
| Article permission level | February 13, 2008 @ 12:45pm | Hi,
I have a number of article teasers on one page that anybody can / should see, but want to limit the possibility to view the actual article to only registered users; and if they are not, they receive an error message "You do not have permission ...". Is there an easy way to set permission level to see article to > 0?
Thanks, David
|
|
|
|
Last Edit: February 13, 2008 @ 12:52pm by David | |
|
|
|
| |
DCSun Administrator
Posts: 392 |
|
|
| February 13, 2008 @ 5:11pm | David,
If you want all articles to behave the same, it's pretty straightforward:
inc-na-idx.php, line 36 should be "if ($Arguments2 == 'view') {". You could replace that with:
Code
if ($Arguments2 == 'view' && $UserLevel < 1) { RedirectToLogin(); } else if ($Arguments2 == 'view') { |
|
If you want to allow viewing of some articles but not others, it's going to get more complicated.
David |
|
|
|
|
|
|
| |
|
|
| February 14, 2008 @ 2:31am | This was perfect. Thanks. Only thing to keep in mind is that one might want to consider to modify the text on the login page so userrs understand whats going on.
Thanks again, David
|
|
|
|
|
|
|
| |
DCSun Administrator
Posts: 392 |
|
|
| February 14, 2008 @ 2:50pm | Yes, you have many options there. If you wanted to display a message instead of going straight to the login page you could use 
Code
print "your message here"; |
| in place of the "RedirectToLogin();" part.
David |
|
|
|
|
|
|
| |
|
|
| articles permissions per article basis? | July 31, 2008 @ 12:25am | 
Quote (DCSun)
David,
If you want all articles to behave the same, it's pretty straightforward:
inc-na-idx.php, line 36 should be "if ($Arguments2 == 'view') {". You could replace that with:
Code
if ($Arguments2 == 'view' && $UserLevel < 1) { RedirectToLogin(); } else if ($Arguments2 == 'view') { |
|
If you want to allow viewing of some articles but not others, it's going to get more complicated.
David |
|
how much more complicated? i think I would like to be able to do this...is this already covered somewhere else?
best, heather |
|
|
|
|
|
|
| |
DCSun Administrator
Posts: 392 |
|
|
| July 31, 2008 @ 12:47am | Heather,
You could do it one of two ways - either with a new field in the database (na-Articles table), that identified the minimum permission level (the current user's level is stored in the $UserLevel variable - such as 1 for basic members, 100 for admins, etc) - or hard code the various article ID's into the inc-na-idx.php file.
David |
|
|
|
|
|
|
| |
|
|
| articles with permission | July 31, 2008 @ 12:58pm | David~ The database option is doable to me as I am fairly comfortable with mySQLadmin. That said, I am sure that I can create a new field - but what to do after that? (yes, i am hogging your attention to teach me how to do things.)
any help is beyond appreciated. i am currently testing everything i can in the demo before getting the license and going live.
best, heather |
|
|
|
|
|
|
| |
DCSun Administrator
Posts: 392 |
|
|
| July 31, 2008 @ 11:23pm | Heather,
There's really three parts to it;
1 - Min permission level stored somewhere (ie added field in db table)
2 - Ability to edit permission setting (either manually through the db, or alongside the rest of the article in the edit form)
3 - Determine whether person viewing article meets the min level required (in inc-na-idx.php)
Pretty busy with a myriad of things at the moment, but I'm happy to put something together for you if/when I get some free time. Entirely possible something like that will make it into a future version of FlexCMS too.
David |
|
|
|
|
|
|
| |
|
|
| articles by permission | August 1, 2008 @ 12:49am | aha! you rule. sounds like a good project for me to learn on...and then see how you would do it whenever you get to it.
again, million thanks
~h |
|
|
|
|
|
|
|

|
|
|