[SOLVED] Restricting resources

General project discussion. NOT for help questions.
Post Reply
daneswood
Forum Members
Forum Members
Posts: 10
Joined: Wed Aug 01, 2007 11:39 am

[SOLVED] Restricting resources

Post 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!
Last edited by daneswood on Mon Aug 06, 2007 11:13 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Restricting resources

Post 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...
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Restricting resources

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Restricting resources

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
wuschel

Re: Restricting resources

Post 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;
      }

     }
    }
  }


?>
Last edited by wuschel on Sun Aug 05, 2007 7:40 am, edited 1 time in total.
daneswood
Forum Members
Forum Members
Posts: 10
Joined: Wed Aug 01, 2007 11:39 am

Re: Restricting resources

Post by daneswood »

Thank you very much!

The FrontEndUsers working together with the CustomContentModule really did it!

Wondefull!!
Post Reply

Return to “General Discussion”