Changeset 6442

Show
Ignore:
Timestamp:
08/21/08 09:18:08 (5 months ago)
Author:
simonmcmanus
Message:

cct - train change

Location:
Trunk/association/serversides/cctiddly/Trunk
Files:
3 added
5 modified

Legend:

Unmodified
Added
Removed
  • Trunk/association/serversides/cctiddly/Trunk/handle/save.php

    r6364 r6442  
    33include_once($cct_base."includes/header.php"); 
    44 
     5if(!user_session_validate()) 
     6{ 
     7        sendHeader("401"); 
     8        exit;    
     9} 
    510 
    611//return result/message 
  • Trunk/association/serversides/cctiddly/Trunk/includes/ccAssignments.php

    r6400 r6442  
    5353} 
    5454 
    55 if ($workspace_create == "A" &&  $tiddlyCfg['allow_workspace_creation'] ==1) 
     55if ($user['verified'] && $workspace_create == "A" &&  $tiddlyCfg['allow_workspace_creation'] ==1) 
    5656{ 
    5757        echo "workspacePermission.create = 1;\n"; 
  • Trunk/association/serversides/cctiddly/Trunk/includes/config.php

    r6435 r6442  
    692692 
    693693//default privileges 
    694 $tiddlyCfg['privilege_misc']['undefined_privilege'] = "A";              //defined what should undefined (U) be treated as 
    695 $tiddlyCfg['privilege_misc']['default_privilege'] = "AAAA";             //default privilege for all group and tags 
     694$tiddlyCfg['privilege_misc']['undefined_privilege'] = "D";              //defined what should undefined (U) be treated as 
     695$tiddlyCfg['privilege_misc']['default_privilege'] = "AUUU";             //default privilege for all group and tags 
    696696//default privileges for certain groups, applied after default_privilege 
    697697//              it is in the form: $tiddlyCfg['privilege_misc']['group_default_privilege']['<group name>'] 
  • Trunk/association/serversides/cctiddly/Trunk/tiddlers/ccAdaptor.js

    r6437 r6442  
    337337       } else { 
    338338                        context.status = false; 
    339                         if(xhr.status == 401) 
     339                        if(xhr.status == 401 || xhr.status==409) 
    340340                        { 
    341341                                        window.loggedIn = false; // we should check for other cases - revisions have changed.  
     
    358358                                        createTiddlyElement(step,"br"); 
    359359                                        createTiddlyElement(step,"br"); 
    360                                         createTiddlyText(step,"You will need to log into the new window and then copy your changes from this window into the new window. "); 
    361                                         createTiddlyElement(step,"br"); 
    362                                         createTiddlyElement(step,"br"); 
    363                                 createTiddlyButton(step,"Open a Window where I can log in and save my changes   .... ",null,function(e){ window.open (window.location,"mywindow");       return false;}); 
     360                                         
     361                                        if(xhr.status==401){ 
     362                                                createTiddlyText(step,"Your session has expired."); 
     363                                                createTiddlyElement(step,"br");  
     364                                                createTiddlyText(step,"You will need to log into the new window and then copy your changes from this window into the new window. "); 
     365                                        }else 
     366                                        { 
     367                                                                createTiddlyText(step,"There was a conflict when saving."); 
     368                                                                createTiddlyElement(step,"br");  
     369                                                                createTiddlyText(step,"Please open the page in a new window to see the changes.");               
     370                                        } 
     371                                        createTiddlyElement(step,"br"); 
     372                                        createTiddlyElement(step,"br"); 
     373                                createTiddlyButton(step,"Open a Window where I can save my changes      .... ",null,function(e){ window.open (window.location,"mywindow");       return false;}); 
    364374                                        createTiddlyElement(step,"br"); 
    365375                                        createTiddlyElement(step,"br"); 
     
    369379                                        createTiddlyText(step,"Sorry for any inconvenience. "); 
    370380                                 
    371                         }else if(xhr.status==403) 
    372                         { 
    373                                 displayMessage("Page Required Reloading."); 
    374381                        }else{ 
    375382                                displayMessage(responseText); 
     
    378385               context.statusText = xhr.statusText;      
    379386                        } 
     387                 
    380388       } 
    381389        if(context.callback){ 
  • Trunk/association/serversides/cctiddly/Trunk/tiddlers/ccWorkspace.js

    r6437 r6442  
    2424***/ 
    2525//{{{ 
    26  
    27 config.backstageTasks.push('create'); 
    28 merge(config.tasks,{create: {text: 'create', tooltip: 'Create new workspace', content:'<<ccCreateWorkspace>>'}}); 
    29  
     26         
     27         
     28 
     29if (isLoggedIn()){ 
     30        config.backstageTasks.push('create'); 
     31        merge(config.tasks,{create: {text: 'create', tooltip: 'Create new workspace', content:'<<ccCreateWorkspace>>'}}); 
     32} 
    3033config.macros.ccCreateWorkspace = {} 
    3134config.macros.ccCreateWorkspace.handler =  function(place,macroName,params,wikifier,paramString,tiddler, errorMsg){