Page 1 of 1

Some changes on Version 0.82

Posted: Wed Jan 19, 2005 9:22 am
by langerxxx
Hello,

I made some changes on Version 0.82. Maybe somebody is interested in. Any Suggestions aber welcome.

Code: Select all

Änderungen am System durch Dan (CMS 0.82):
----

Datum: 19.01.2005
Datei: admin/addcontent.php

New Pages set to status inactive.

Neue Seiten werden zunächst auf den Status "inaktiv gesetzt".

Zeile 100:

Original: $contentobj->mActive = True;
Neu:	  $contentobj->mActive = False;

----

Datum: 19.01.2005
Datei: admin/listcontent.php


Befor setting Content-Pages to status active it will be checked if the user is allowed to do this.
Added permission status "Publish Content".

Vor dem freischalten/aktivieren bzw. inaktivieren einer Seite wird zunächst überprüft, ob der Benutzer dazu berechtigt ist. Dazu
wurde der Rechte-Status "Publish Content" eingeführt. Berechtigt sind alle Admin oder User, die diesen Status besitzen.

Zeile 74:

Original: #$permission = ($modifyall || check_ownership($userid,$_GET["setactive"]) || check_authorship($userid,$_GET["setactive"]));
          $permission = true;

Neu:	  $permission = ($modifyall || check_permission($userid, 'Publish Content'));
          #$permission = true;
          
--
Zeile 96:

Original: #$permission = ($modifyall || check_ownership($userid,$_GET["setinactive"]) || check_authorship($userid,$_GET["setinactive"]));
          $permission = true;
          
Neu:      $permission = ($modifyall || check_permission($userid, 'Publish Content'));
          #$permission = true;
          
---

Show only those Contents to a user which he has created or where he is an additional author.

Einem Nutzer sollen nur Seiten angezeigt werden, wenn er Admin-Rechte hat oder falls er die Seite erstellt hat und/oder als zusätzlicher 
Autor für diese Seite hinzugefügt wurde.

--
Zeile 16x:

Hinzugefügt:
          // check the status of the current user. display only the pages for which the has got write/change permisson.
          // to view a page in the list, you must be admin, owner, or additional author
    	  $permission = ($modifyall || check_ownership($userid,$one->Id()) || check_authorship($userid,$one->Id()));

          if($permission)
          {
          
          ...
          
          }
          
----

Datum 19.01.2005
Datei lib/contenttypes/Content.inc.php

Only users with permission status "Publish Content" are allowed to set pages active/inactive or show in menu/show not in menu.

Der Rechtestatus "Publish Content" erlaubt es Seite  aktiv zu schalten und auszuwählen, ob eine Seite im Menü angezeigt werden soll.

Zeile: 136

Original: $text .= '<tr><td>'.lang('active').':</td><td><input type="checkbox" name="active"'.($this->mActive?' checked="checked"':'').' /></td></tr>';
          $text .= '<tr><td>'.lang('showinmenu').':</td><td><input type="checkbox" name="showinmenu"'.($this->mShowInMenu?' checked="checked"':'').' /></td></tr>';


Neu:      $userid = get_userid();
          $permission = check_permission($userid, 'Publish Content');
          if($permission)
          {
                  $text .= '<tr><td>'.lang('active').':</td><td><input type="checkbox" name="active"'.($this->mActive?' checked="checked"':'').' /></td></tr>';
                  $text .= '<tr><td>'.lang('showinmenu').':</td><td><input type="checkbox" name="showinmenu"'.($this->mShowInMenu?' checked="checked"':'').' /></td></tr>';
          
          }
Best regards
Dan

Some changes on Version 0.82

Posted: Wed Jan 19, 2005 10:33 am
by Ted
Very nice changes. I actually like the fact that there is some workflow there, however, I'm a bit leary to add it in as it could be confusing to people who are either just getting started, or people who are the only ones who work on their site. I'll bring it up on IRC and see what people think (or any other readers can throw their opinion here as well).

Thanks.

Some changes on Version 0.82

Posted: Wed Jan 19, 2005 4:02 pm
by calguy1000
sounds like a good idea to me (I hate not having IRC access at the office).

I personally don't use multiple admins (yet) but it is rapidly getting that way and this would be a great feature

though I think it should be optional (wrapped inside of a config item or something).

Some changes on Version 0.82

Posted: Wed Jan 19, 2005 7:42 pm
by Ted
I'm actually think it might be possible to do this exclusively in the module that you could install, which would probably be included in a default installation. Some things to do this are still not totally there yet in the new API, but I'll keep it in the back of my mind as I continue on.