RE: Problem assigning rights to WebDav folder in Jahia 4.1 NOT JahiaPageNotFoundException's on 4.0.4 Upgrade

"Hirschfeld, Max" <[email protected]> Fri, 22 Dec 2006 17:25:07 +0100
Newsgroups gmane.comp.cms.jahia.install
Message-ID <[email protected]>
BTW, below is my attempt to make a SQL server equivalent of the script
to fix the problem with the WebDav rights. I am not sure if it is right
(please advise):

use jahia41dev

select distinct object_id into tmp_sl2_all from
jahia_sl2_permissions,jahia_sl2_uri where subject_id=uri_id and
uri_string='all';

select distinct object_id into tmp_sl2_authenticated from
jahia_sl2_permissions,jahia_sl2_uri where subject_id=uri_id and
uri_string='authenticated';

select distinct object_id into tmp_sl2_unauthenticated from
jahia_sl2_permissions,jahia_sl2_uri where subject_id=uri_id and
uri_string='unauthenticated';

delete jahia_sl2_permissions from jahia_sl2_permissions, jahia_sl2_uri
where subject_id=uri_id and uri_string='nobody' and object_id in (select
object_id from tmp_sl2_all);

delete jahia_sl2_permissions from jahia_sl2_permissions, jahia_sl2_uri
where subject_id=uri_id and uri_string='user' and object_id in (select
object_id from tmp_sl2_authenticated);

delete jahia_sl2_permissions from jahia_sl2_permissions, jahia_sl2_uri
where subject_id=uri_id and uri_string='guest' and object_id in (select
object_id from tmp_sl2_unauthenticated);

update jahia_sl2_permissions 
set subject_id = u1.uri_id 
from jahia_sl2_permissions p, jahia_sl2_uri u1 , jahia_sl2_uri u2
where p.subject_id =u2.uri_id 
and u1.uri_string  ='all' 
and u2.uri_string  ='nobody' 
and u1.namespace   =u2.namespace;


update jahia_sl2_permissions 
set subject_id=u1.uri_id 
from jahia_sl2_permissions p, jahia_sl2_uri u1 , jahia_sl2_uri u2
where p.subject_id=u2.uri_id
and u1.uri_string   = 'authenticated' 
and u2.uri_string   = 'user'
and u1.namespace    = u2.namespace

update jahia_sl2_permissions
set subject_id = u1.uri_id
from jahia_sl2_permissions p, jahia_sl2_uri u1 , jahia_sl2_uri u2
where p.subject_id=u2.uri_id
and u1.uri_string='unauthenticated' 
and u2.uri_string='guest' 
and u1.namespace=u2.namespace;

drop table tmp_sl2_all;

drop table tmp_sl2_authenticated;

drop table tmp_sl2_unauthenticated;