Skip to content

Commit

Permalink
Fixed issue: auth_webserver_autocreate_user option not properly setti…
Browse files Browse the repository at this point in the history
…ng template permission
  • Loading branch information
c-schmitz committed Jun 18, 2014
1 parent 4ac107a commit 66b0565
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 41 deletions.
11 changes: 6 additions & 5 deletions application/core/UserIdentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ public function authenticate($sOneTimePassword='')
$aTemplates=explode(",",$aUserProfile['templatelist']);
foreach ($aTemplates as $sTemplateName)
{
$oRecord=new Templates_rights;
$oRecord->uid = $oUser->uid;
$oRecord->folder = trim($sTemplateName);
$oRecord->use = 1;
$oRecord->save();
$oPermission=new Permission;
$oPermission->uid = $oUser->uid;
$oPermission->entity = 'template';
$oPermission->permission = trim($sTemplateName);
$oPermission->read_p = 1;
$oPermission->save();
}

// read again user from newly created entry
Expand Down
2 changes: 0 additions & 2 deletions application/tests/staticCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ function checkStatic($line)
'SettingGlobal::',
'Zend_Http_Client::',
'Zend_XmlRpc_Value::',
'Templates_rights_model::',
'Zend_XmlRpc_Server_Fault::',
'Zend_XmlRpc_Value::',
'Zend_Server_Cache::',
Expand Down Expand Up @@ -129,7 +128,6 @@ function checkStatic($line)
'surveypermission::',
'Template::',
'templates::',
'Templates_rights::',
'register::',
'::first',
'::before',
Expand Down
11 changes: 0 additions & 11 deletions installer/sql/create-mssql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -535,17 +535,6 @@ CREATE TABLE [prefix_users] (
);


--
-- Table structure for table templates_rights
--
CREATE TABLE [prefix_templates_rights] (
[uid] int NOT NULL,
[folder] varchar(255) NOT NULL,
[use] int NOT NULL,
PRIMARY KEY ([uid],[folder])
);


--
-- Table structure for table templates
--
Expand Down
11 changes: 0 additions & 11 deletions installer/sql/create-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -539,17 +539,6 @@ CREATE TABLE `prefix_users` (
) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;


--
-- Table structure for table templates_rights
--
CREATE TABLE `prefix_templates_rights` (
`uid` int(11) NOT NULL,
`folder` varchar(255) NOT NULL,
`use` int(11) NOT NULL,
PRIMARY KEY (`uid`,`folder`)
) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;


--
-- Table structure for table templates
--
Expand Down
12 changes: 0 additions & 12 deletions installer/sql/create-pgsql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -542,18 +542,6 @@ CREATE TABLE prefix_users (
"modified" timestamp
);


--
-- Table structure for table templates_rights
--
CREATE TABLE prefix_templates_rights (
"uid" integer NOT NULL,
"folder" character varying(255) NOT NULL,
"use" integer NOT NULL,
CONSTRAINT prefix_templates_rights_pkey PRIMARY KEY ("uid","folder")
);


--
-- Table structure for table templates
--
Expand Down

0 comments on commit 66b0565

Please sign in to comment.