Upgraded server and all permissions were wiped out

Asked by Matt Rozema

Hello all,

I upgraded my server from 1.2 to 1.4.2. Everything seemed to go off without a hitch until users reported not being able to see layouts.
I did some digging and found that no permissions were set on any of the layouts. Then I went to the design page of several layouts and found that every element in every layout has a permissions menu and those were all blank.

How do I go about adding the correct permissions quickly?

Thanks,
Matt.

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Harrington
Solved:
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

The upgrade doesn't attempt to guess what permissions you want set as there
is no direct correlation between the old and new permissions model.

There was an previous question where someone posted some SQL to give
everyone access to everything. I'm not at a computer right now so I can't
search for you.

Alex

Revision history for this message
Matt Rozema (mrozema) said :
#2

My original search didn't yield any useful results, but I'll give it another try.

Matt.

Revision history for this message
Matt Rozema (mrozema) said :
#3

Alex,
If you find the page, please let me know. I'm trying to find it, but not doing so well.

Thanks,
Matt.

Revision history for this message
Best Alex Harrington (alexharrington) said :
#4

Hi Matt

First, take a database backup. Then run the following SQL queries:

INSERT INTO lkcampaigngroup (CampaignID, GroupID, View, Edit, Del)
SELECT DISTINCT MediaID, GroupID, 1, 1, 1
FROM `campaign`
CROSS JOIN `group`
WHERE group.IsEveryone = 1;

INSERT INTO lkmediagroup (MediaID, GroupID, View, Edit, Del)
SELECT DISTINCT MediaID, GroupID, 1, 1, 1
FROM `media`
CROSS JOIN `group`
WHERE group.IsEveryone = 1;

INSERT INTO lklayoutregiongroup (LayoutID, RegionID, GroupID, View, Edit, Del)
SELECT DISTINCT layoutid, regionid, GroupID, 1, 1, 1
FROM `lklayoutmedia`
CROSS JOIN `group`
WHERE group.IsEveryone = 1;

INSERT INTO lklayoutmediagroup (MediaID, LayoutID, RegionID, GroupID, View, Edit, Del)
SELECT DISTINCT MediaID, layoutid, regionid, GroupID, 1, 1, 1
FROM `lklayoutmedia`
CROSS JOIN `group`
WHERE group.IsEveryone = 1;

Then make sure in Settings under default you have Media Default and Layout Default set to "Public".

Alex

Revision history for this message
Alex Harrington (alexharrington) said :
#5

I've added this as an FAQ so I stand a chance of finding it in the future :L
FAQ #2253: “1.2.x -> 1.4.x upgrade permissions”.

Revision history for this message
Matt Rozema (mrozema) said :
#6

Thanks Alex Harrington, that solved my question.

Revision history for this message
Matt Rozema (mrozema) said :
#7

Thanks for your help Alex. I saw that post at some point, but I clearly didn't know what I was looking for. :-P

Revision history for this message
Matt Rozema (mrozema) said :
#8

Hi Alex,

I had to modify your first query slightly. I had to change MediaID to CampaignID on the second line. It should look like this:

INSERT INTO lkcampaigngroup (CampaignID, GroupID, View, Edit, Del)
SELECT DISTINCT CampaignID, GroupID, 1, 1, 1
FROM `campaign`
CROSS JOIN `group`
WHERE group.IsEveryone = 1;

Matt.