Skip to main content

We’ve just deployed Skuid to an OEM customer, and applied the ‘Skuid Page Viewer’ permission set to all users, incl the Administrator. We would prefer them to not be able to edit our Skuid pages (at least in the early stages) ( so no one gets the builder permission set)

However, the edit/gear button is still showing for the Administrator, and he’s been able to click and edit the page.

65f16b637c343f05b6fe367724cb0b3e0cfcc288.png

Unfortunately its too late to apply the apex class & trigger outlined at the bottom here http://help.skuidify.com/m/11217/l/121145-packaging-your-skuid-pages as the app has already passed sec review and we’re technically not able to add another class in at this point…

Any suggestions as to how to prevent the admin from seeing this button?

Thanks. 

The Edit Page button appears if the running user has Edit permissions on the skuid Page object, so the reason it’s showing up is that your System Admin user must have Edit rights on the Page object. Ideally you could adapt the Profile that your System Admin gets, but this is not always possible.

One thing you can do is to hide the Edit Page DOM element after the page loads, by adding the following JavaScript to your Page(s):


(function(skuid){ <br>&nbsp; &nbsp;var $ = skuid.$;<br>&nbsp; &nbsp;$(function(){<br>&nbsp; &nbsp; &nbsp; $('#skuidEditBtnContainer').hide();<br>&nbsp; &nbsp;});<br>})(skuid); 


Regarding adding a Class and Trigger to your app post-Security Review, technically you can do this no problem — just upload a new version of your package, and once it’s on AppExchange, just click “Start Review” on that version. You’ll walk through the Security Review wizard (8 steps or whatever it is), and at the end of it, your new version will be automatically approved, instantaneously — no more money, no more lengthy review by the SFDC Security team. Once you’ve passed the first time, all subsequent Security Reviews are passed immediately and automatically.


fantastic. Thanks Zach.


Thanks gents. This is info my team will need in about three weeks’ time, so nice to know in advance. 🙂


Zach, I tried adding the JS above to one of my pages, but the Edit Page button still shows.  I used the JS Resource Location as Static Resource, and In-Line, but did not have success.  Is there something I’m missing??  Thanks for your help.


CM,


In order to use this, you will have to add it as ‘In-Line (Snippet)’ and then call it using a page load action sequence.

Jquery cannot “hide” the element until it is rendered on the page, from what I understand.


var params = argumentsr0],<br>$ = skuid.$;
$('#skuidEditBtnContainer').hide();

Clark, Thank you so much, this woked beautifully.  I really appreciate your help.


For some reason, this wouldn’t work for me, so I took a different approach and just made the button transparent with CSS. Just add this as inline CSS to the page and the button is still there, you just can’t see it. If you hover over the spot where it would normally appear, it is the curser changes and you can still click the button to be taken to the page editor.


.skuidEditBtn {

    background-color: transparent;

    color: transparent;

    border: transparent;

       -webkit-box-shadow: 0 0px 0px rgba(100,100,100,.4);

    -moz-box-shadow: 0 2px 10px rgba(100,100,100,.4);

}


Hey Raymond, thanks for sharing your solution here.

If you’re building in U3, it may be because the Edit Page Button CSS changed slightly from U2 to U3. You should also be able to hide the Edit Page button using


.skuidEditBtn {<br>&nbsp; &nbsp; display: none;<br>}&nbsp;

Anna for the win!