Khoros Community

Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Permissions excel overview - use as you like

Not sure if this is useful for anyone but we created this overview to keep track of our permissions and roles. Basically we use this to keep track of which role has which permission setting. I added some "fake roles" since these are specific to each community.

I have recently updated it (Yellow=new permissions, Strike-through = old/no longer exists) and I think some permissions may only be there, or missing depending on where you are using that product, or not.

For example, initially we did not have TKB permissions in the list since we were not using TKB. Now, these permissions are there since we implemented TKB last year.

So, by no means do I actually know how useful this is for others. It may need some further updating, perhaps not. But I find it quite useful as a governance model for keeping track of roles/permissions. Once you have the majority there,  updating/adding/removing is a lot less effort.

Oh, and if anyone has any idea how to readily extract this out of admin...thanks for that golden tip 😁

Cheers

Wendy

Learning from others and helping where I can!
Community Passionista!
5 Replies 5
Honored Contributor Honored Contributor
Honored Contributor

Re: Permissions excel overview - use as you like

Didn you see this?@kgroneman 

Learning from others and helping where I can!
Community Passionista!
Reply
Loading...
Esteemed Contributor
Esteemed Contributor

Re: Permissions excel overview - use as you like

I did now.  Thanks! - Kim

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.
Reply
Loading...
Honored Contributor Honored Contributor
Honored Contributor

Re: Permissions excel overview - use as you like

**Updated for easier copy/pasting of results

@Wendy_S it's not an API, but it still removes a LOT of manual work; should make it fairly easy to copy/paste from admin to Excel or GSheets.

I tested this in Chrome.

Edit a role, then Right-click, Inspect, Console, paste the below and hit return:

(I'm not very good at js when jquery is out of the picture ..oO)

 

 

var full_text = '';
var sections = document.querySelectorAll('.lia-form-fieldset-toggelable');

for(sec_num=0; sec_num < sections.length; sec_num++) {
	var section_rows = sections[sec_num].querySelectorAll('.lia-form-row');
	var section_label_text = sections[sec_num].querySelector('.lia-fieldset-title').innerText;
	full_text = full_text + section_label_text.trim() + '\n';
	
	for(row_num=0; row_num < section_rows.length; row_num++) {
		var section_row_label = section_rows[row_num].querySelector('.lia-form-label');		
		var section_row_label_text = section_row_label.innerText;

		full_text = full_text + section_row_label_text;
		var section_permissions = section_rows[row_num].querySelectorAll('li');
		var permission_text = '';
		for(perm_num=0; perm_num < section_permissions.length; perm_num++) {
			var permission = section_permissions[perm_num].querySelector('.permissions-radio-button');
			var permission_state = permission.checked;
			permission_text = permission_text + permission_state + ',';
		}
		full_text = full_text + ',' + permission_text.slice(0,permission_text.length -1) + '\n';
	}
	full_text = full_text + '\n';
}
full_text = document.querySelector('.lia-panel-status-banner-note').innerText.replace('Editing role: ','') + '\n' + full_text;
if(!el) {
	var el = document.createElement('div');
	var el_ta = document.createElement('textarea');
	el.style.cssText = 'position:fixed;top:10px;left:10px;width:400px;height:100%;z-index:10000;background:#fff2cb;font-family:Arial;font-size:10pt; padding:0px;';
	el_ta.style.cssText = 'width:100%;height:100%;';
	document.body.appendChild(el);
	el.appendChild(el_ta)
}
el_ta.value = full_text;

 

 

 


CM at Spotify
Community Ergo Sum
Reply
Loading...
Esteemed Contributor
Esteemed Contributor

Re: Permissions excel overview - use as you like

@PerBonomi  for those of us less knowledgeable, where is the "console" you speak of to throw it in?   Sorry if dumb question. 

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.
Reply
Loading...
Honored Contributor Honored Contributor
Honored Contributor

Re: Permissions excel overview - use as you like

Apologies. I've updated my reply with better instructions and I updated the code to work a bit better.


CM at Spotify
Community Ergo Sum
Reply
Loading...