Loading...
 
Skip to main content

Architecture / Installation


Problem with PostgreSQL

posts: 21 Netherlands

I just installed tikiwiki 1.8.2 on PostgreSQL 7.4.1.
Installation succeeds, but then funny things start to happen.
For example, I assigned all possible permissions for a Wiki word, and users can do everything (lock, browse history etc) but cannot edit, as system complains they are not allowed to.

I switched to MySQL and it seems to be working fine (well, almost😊 ).
Is it a known problem or is there something wrong with my installation?

posts: 2881 United Kingdom

Hi There

Can you get in the postgres tables that the user or users group has the tiki_p_edit permission?

Ta

Damian


posts: 21 Netherlands
Sure I could, just tell me what SELECTs to do 😊
posts: 2881 United Kingdom

> eru:
> Sure I could, just tell me what SELECTs to do 😊

Have a
Copy to clipboard
select * from users_grouppermissions where permName = 'tiki_p_edit'


and lets see which groups have the perm

Damian


posts: 2881 United Kingdom

> eru:
> Sure I could, just tell me what SELECTs to do 😊

Have a
Copy to clipboard
select * from users_grouppermissions where permName = 'tiki_p_edit'


and lets see which groups have the perm

Damian


posts: 21 Netherlands
Copy to clipboard
SELECT * FROM users_grouppermissions ;

returns empty set.

You meant probably
Copy to clipboard
SELECT * FROM users_objectpermissions ;
where I get:
Copy to clipboard
groupName | permName | objectType | objectId ------------+-----------------------+------------+---------------------------------- Registered | tiki_p_view | wiki page | 6d7f618fdb6590000b06a03865b40191 Registered | tiki_p_edit | wiki page | 6d7f618fdb6590000b06a03865b40191 Registered | tiki_p_lock | wiki page | 6d7f618fdb6590000b06a03865b40191 Registered | tiki_p_admin_wiki | wiki page | 6d7f618fdb6590000b06a03865b40191

I don't know how objectId translates to wiki page ID (which is 1 - HomePage), but it works as DB changes when I manipulate website.

And, of course:
Copy to clipboard
select * from users_usergroups ;
yields:
Copy to clipboard
userId | groupName --------+------------ 2 | Registered

where 2 is my user id.
So, database seems ok... strange, right? 😊
A hint - maybe something with small/capital letters, as pgsql is case-sensitive? No other ideas here.

posts: 2881 United Kingdom

Ok some english translations of the results 😉

> eru:

>
Copy to clipboard
> SELECT * FROM users_grouppermissions ; >

> returns empty set.

This means that there are no global permissions setup by admin->groups the results below show me that all those permName permissions for Registered are only for 1 particular wiki page. (the objectId hash)

I think you'll need to review the global permissions through admin->groups rather than individuals to get what you want setup first. Then go locking individual pages if needed.

Damian

p.s. follow here for reference 😉

> You meant probably
Copy to clipboard
> SELECT * FROM users_objectpermissions ; >
> where I get:
Copy to clipboard
> groupName | permName | objectType | objectId > ------------+-----------------------+------------+---------------------------------- > Registered | tiki_p_view | wiki page | 6d7f618fdb6590000b06a03865b40191 > Registered | tiki_p_edit | wiki page | 6d7f618fdb6590000b06a03865b40191 > Registered | tiki_p_lock | wiki page | 6d7f618fdb6590000b06a03865b40191 > Registered | tiki_p_admin_wiki | wiki page | 6d7f618fdb6590000b06a03865b40191 >

> I don't know how objectId translates to wiki page ID (which is 1 - HomePage), but it works as DB changes when I manipulate website.

> And, of course:
Copy to clipboard
> select * from users_usergroups ; >
> yields:
Copy to clipboard
> userId | groupName > --------+------------ > 2 | Registered >

> where 2 is my user id.
> So, database seems ok... strange, right? 😊
> A hint - maybe something with small/capital letters, as pgsql is case-sensitive? No other ideas here.


posts: 2881 United Kingdom

Ok some english translations of the results 😉

> eru:

>
Copy to clipboard
> SELECT * FROM users_grouppermissions ; >

> returns empty set.

This means that there are no global permissions setup by admin->groups the results below show me that all those permName permissions for Registered are only for 1 particular wiki page. (the objectId hash)

I think you'll need to review the global permissions through admin->groups rather than individuals to get what you want setup first. Then go locking individual pages if needed.

Damian

p.s. follow here for reference 😉

> You meant probably
Copy to clipboard
> SELECT * FROM users_objectpermissions ; >
> where I get:
Copy to clipboard
> groupName | permName | objectType | objectId > ------------+-----------------------+------------+---------------------------------- > Registered | tiki_p_view | wiki page | 6d7f618fdb6590000b06a03865b40191 > Registered | tiki_p_edit | wiki page | 6d7f618fdb6590000b06a03865b40191 > Registered | tiki_p_lock | wiki page | 6d7f618fdb6590000b06a03865b40191 > Registered | tiki_p_admin_wiki | wiki page | 6d7f618fdb6590000b06a03865b40191 >

> I don't know how objectId translates to wiki page ID (which is 1 - HomePage), but it works as DB changes when I manipulate website.

> And, of course:
Copy to clipboard
> select * from users_usergroups ; >
> yields:
Copy to clipboard
> userId | groupName > --------+------------ > 2 | Registered >

> where 2 is my user id.
> So, database seems ok... strange, right? 😊
> A hint - maybe something with small/capital letters, as pgsql is case-sensitive? No other ideas here.


posts: 21 Netherlands

Well, it helped indeed.

But I think this is incorrect behaviour anyway.
What I have is I have all privileges for this wikipage set, so why should I set global privileges for all the pages?
What if I want to allow group of users to view and edit only some specific page(s)?

Anyway, I had these permissions for 'Registered' users:
tiki_p_admin_wiki, tiki_p_edit, tiki_p_lock, tiki_p_view.

A 'Registered' user couldn't enter 'Edit' for the page, but could enter and successfully manage permissions for this page!
Adding tiki_p_view globally for group 'Registered' helped (note: not tiki_p_edit).

Or, perhaps, 'edit' page itself is protected by tiki_p_view which cannot be assigned individually to it? But if so, why 'perms' page isn't protected the same way?

Something's fishy, anyway 😊

Thanks for help, Damian - are you the only person here? I posted two messages and only you answer 😉

posts: 2881 United Kingdom

> eru:
> Well, it helped indeed.
>
> But I think this is incorrect behaviour anyway.
> What I have is I have all privileges for this wikipage set, so why should I set global privileges for all the pages?
> What if I want to allow group of users to view and edit only some specific page(s)?
>

Yes, I too agree with you, but somewhere in the code is a little buglet. Ive seen it before where people are pulling out there hair, unfortunately Ive never experienced it myself, otherwise Id have a good testbed for killing it.

> Anyway, I had these permissions for 'Registered' users:
> tiki_p_admin_wiki, tiki_p_edit, tiki_p_lock, tiki_p_view.
>
> A 'Registered' user couldn't enter 'Edit' for the page, but could enter and successfully manage permissions for this page!
> Adding tiki_p_view globally for group 'Registered' helped (note: not tiki_p_edit).
>
> Or, perhaps, 'edit' page itself is protected by tiki_p_view which cannot be assigned individually to it? But if so, why 'perms' page isn't protected the same way?
>
> Something's fishy, anyway 😊
>
> Thanks for help, Damian - are you the only person here? I posted two messages and only you answer 😉
>

Yeah, they are my second home, first is on irc in #tikiwiki 😉

Damian


posts: 2881 United Kingdom

> eru:
> Well, it helped indeed.
>
> But I think this is incorrect behaviour anyway.
> What I have is I have all privileges for this wikipage set, so why should I set global privileges for all the pages?
> What if I want to allow group of users to view and edit only some specific page(s)?
>

Yes, I too agree with you, but somewhere in the code is a little buglet. Ive seen it before where people are pulling out there hair, unfortunately Ive never experienced it myself, otherwise Id have a good testbed for killing it.

> Anyway, I had these permissions for 'Registered' users:
> tiki_p_admin_wiki, tiki_p_edit, tiki_p_lock, tiki_p_view.
>
> A 'Registered' user couldn't enter 'Edit' for the page, but could enter and successfully manage permissions for this page!
> Adding tiki_p_view globally for group 'Registered' helped (note: not tiki_p_edit).
>
> Or, perhaps, 'edit' page itself is protected by tiki_p_view which cannot be assigned individually to it? But if so, why 'perms' page isn't protected the same way?
>
> Something's fishy, anyway 😊
>
> Thanks for help, Damian - are you the only person here? I posted two messages and only you answer 😉
>

Yeah, they are my second home, first is on irc in #tikiwiki 😉

Damian