Page 1 of 1
[SOLVED] Restricting resources
Posted: Fri Aug 03, 2007 4:03 pm
by daneswood
I was trying to restrict several pages to some users in my CMS website.
I only found one module for doing this (zugriff), does anybody know another way of restricting content or any other module?
I think this module only works with some versions of CMS Made Simple; I have tried with the last one and the previous and always get the same error after copying the folder into the modules folder and trying to acces the module page in my administrator:
Code: Select all
Fatal error: Class zugriffmodule: Cannot inherit from undefined class cmsmodulecontenttype in /home/sites/nomadesurbanos.com/public_html/modules/zugriff/zugriff.module.php on line 1333
Does anybody know what I can I do? Any idea will be really appreciated!
Thank you!
Re: Restricting resources
Posted: Sat Aug 04, 2007 7:14 pm
by Dr.CSS
You can make a new group and give them no permissions add a user under this group then on a page, added or existing, you give them ownership, in the drop down that says owner: and they will login and see only that page to edit...
With just content type, title, menu text, template, and the content edit box....
But it still looks like they can give ownership to others, and all the rest of the options on the Option tab...
Re: Restricting resources
Posted: Sat Aug 04, 2007 8:19 pm
by Nullig
Are you looking to restrict access to the front end? or the admin?
If it's the front end, then the Frontend Users (FEU) module is what you're looking for.
If it's the admin access, then... what Mark said.
Nullig
Re: Restricting resources
Posted: Sun Aug 05, 2007 12:11 am
by calguy1000
To restrict access to frontend users you need both FrontEndUsers and CustomContent
if you are looking for a larger number of users and want them to register themselves, then you will need SelfRegistration.
You may also want the captcha module depending on the type of authentication you want.
Re: Restricting resources
Posted: Sun Aug 05, 2007 7:35 am
by wuschel
I do this in cmsms with a plugin from powercms.org.
I set it in the template before {content}.
It is simple and it works
Code: Select all
<?php
#verboten
#PowerCMS (c)2006 by Jan Czarnowski (piratos@coftware.de)
#This project's homepage is: http://powercms.org
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# example/Beispiel {verboten users='user1:user1passwort;user2:user2passwort;user3:user3passwort'}
#
function smarty_function_verboten($params, &$smarty)
{
$users_t=isset($params['users']) ? $params['users']:'';
$text=isset($params['text']) ? $params['text']:'Ihr Login ist fehlgeschlagen !';
$realm=isset($params['realm']) ? $params['realm']:'Service';
if ($users_t=='' )
{
}
else
{
$users=explode(';',$users_t);
$user=array();
foreach ($users as $one)
{
$x=explode(':',$one);
$user[$x[0]]=$x[1];
}
if (!isset($_SERVER['PHP_AUTH_USER']))
{
Header("WWW-Authenticate: Basic realm=\"$realm\"");
Header("HTTP/1.0 401 Unauthorized");
echo $text;
exit;
}
else
{
if (!array_key_exists($_SERVER['PHP_AUTH_USER'],$user) && !$_SERVER['PHP_AUTH_PW'] == $user[$_SERVER['PHP_AUTH_USER']] )
{
echo $text;
exit;
}
}
}
}
?>
Re: Restricting resources
Posted: Mon Aug 06, 2007 11:12 am
by daneswood
Thank you very much!
The FrontEndUsers working together with the CustomContentModule really did it!
Wondefull!!