Prevent/Restrict "Browse" portal pages on links

Aug 21, 2012 at 9:09 PM

I'm returning to this editor and provider after a long break.  The progress made is VERY impressive.  One thing I noticed however...when I expose the toolbar [link] for users, the link dialog shows an option to select a page from the portal.

This is currently showing ALL pages on this portal, even those the logged in user does not have permissions to view.

Is there a way to prevent / turn off this feature (browse portal page) or ideal, ensure that the drop down list of pages respects the user's access permissions.

 

Steven 

Aug 23, 2012 at 12:04 PM
Airstream345 wrote:

I'm returning to this editor and provider after a long break.  The progress made is VERY impressive.  One thing I noticed however...when I expose the toolbar [link] for users, the link dialog shows an option to select a page from the portal.

This is currently showing ALL pages on this portal, even those the logged in user does not have permissions to view.

Is there a way to prevent / turn off this feature (browse portal page) or ideal, ensure that the drop down list of pages respects the user's access permissions.

 

Steven

You can turn it off in the config.js by removing the "dnnpages" plugin

config.extraPlugins = 'oEmbed,syntaxhighlight,tableresize,stylesheetparser,qrcodes,newsarticleslinks,codemirror,dnnpages,xmlstyles,xmltemplates';

In theory the plugin checks the user permission, and as far as i can see it did work for me. Which dnn Version did you use?

Aug 23, 2012 at 11:44 PM

Awesome news on the config.

We're using DNN 6.1.2 and seeing ALL tabs in the drop down.

Thank you for the quick response.

Aug 24, 2012 at 5:26 PM
Airstream345 wrote:

Awesome news on the config.

We're using DNN 6.1.2 and seeing ALL tabs in the drop down.

Thank you for the quick response.

Is this a child portal?

I can not reproduce this with the latest BETA Version of my Provider 1.14.06

Mar 11, 2013 at 12:38 PM
dnn 6.01.05
CKEditor 2.00.04

Thank you for the tip on how to disable dnnpages on the URL link but now I'm curious how to disable the Link and Advanced tabs on the Image Properties so that just the Image Info tab is visible?
Mar 29, 2013 at 7:03 AM
Fzzt wrote:
dnn 6.01.05
CKEditor 2.00.04

Thank you for the tip on how to disable dnnpages on the URL link but now I'm curious how to disable the Link and Advanced tabs on the Image Properties so that just the Image Info tab is visible?
If you want to disable both tabs you need to modify the config.js file in the editor provider folder. By adding the following code at the end of the file
CKEDITOR.on( 'dialogDefinition', function( ev )
   {
      // Take the dialog name and its definition from the event data.
      var dialogName = ev.data.name;
      var dialogDefinition = ev.data.definition;
 
      // Check if the definition is from the dialog we're
      // interested in (the 'link' dialog).
      if ( dialogName == 'image' )
      {
         // Remove the 'Target' and 'Advanced' tabs from the 'Link' dialog.
         dialogDefinition.removeContents( 'Link' );
         dialogDefinition.removeContents( 'advanced' );
 
      }
   });
Jun 25, 2013 at 10:09 PM
if ( dialogName == 'image' ) {
// Remove the 'Target' and 'Advanced' tabs from the 'Link' dialog.
dialogDefinition.removeContents( 'Link' );
dialogDefinition.removeContents( 'advanced' );>
}
.
Is there any way to disable these per toolbar?
Jun 26, 2013 at 10:40 AM
bradbamford wrote:
if ( dialogName == 'image' ) {
// Remove the 'Target' and 'Advanced' tabs from the 'Link' dialog.
dialogDefinition.removeContents( 'Link' );
dialogDefinition.removeContents( 'advanced' );>
}
.
Is there any way to disable these per toolbar?
Based on which toolbar button exactly? I guess you want to remove the tabs only when some buttons are not visible or visible? If you tell me which i show you how you can modify the script.
Jul 10, 2013 at 6:17 PM
I have several custom toolbars assigned to Roles.

For a simple example they are named as follows:
Basic toolbar
Custom toolbar 1
Custom toolbar 2
Custom toolbar 3
Custom toolbar 4

Let's say I want to allow the browse button only for "Custom toolbar 2" and "Customer toolbar 3" when they click on the insert IMAGE button icon.

How can I do this?
Jul 10, 2013 at 11:58 PM
bradbamford wrote:
I have several custom toolbars assigned to Roles.

For a simple example they are named as follows:
Basic toolbar
Custom toolbar 1
Custom toolbar 2
Custom toolbar 3
Custom toolbar 4

Let's say I want to allow the browse button only for "Custom toolbar 2" and "Customer toolbar 3" when they click on the insert IMAGE button icon.

How can I do this?
I don't understand the Problem if you assign each role to a a Custom toolbarset then why not simply set the file browser access for each role?
Jul 11, 2013 at 2:53 AM
Edited Jul 11, 2013 at 3:10 AM
I guess that's part of my problem.
On the File Browser Settings Tab, i see the list of Roles, but there is no check boxes visible, they are all set to visibility: hidden; ?


EDIT: I disabled the following line in options.css:
li.optionsContainer .dnnCheckbox {display: none!important;}

I was then able to check the checkboxes and save the setting.
Jul 11, 2013 at 3:43 AM
bradbamford wrote:
I guess that's part of my problem.
On the File Browser Settings Tab, i see the list of Roles, but there is no check boxes visible, they are all set to visibility: hidden; ?
Which dnn Version and which Version of the Editor are you using. I remember i fixed that Issue in 2.00.5.