Discussion Forums  >  Self Hosted Control Panels

Replies: 3    Views: 82

Jcommander
Aspiring developer
Profile
Posts: 42
Reg: Feb 04, 2013
Colorado Spring...
11,320
03/12/13 07:01 PM (12 years ago)

Disable source code downloads & disable delete app

Has anyone used this mod? If you did, did you have any problems with it? I used it in my Self Hosted Control Panel and it didn't work quite right. Maybe I did something wrong when I edited the file, I don't know, but this is what the result was. 1.) It did remove the Disable source code downloads & disable delete app from my clients control panel, however, whenever you click on any other options these two options return back to the left menu. 2.) The mod kept me from being able to publish my apps in my admin control panel. If you need clarification on what I am trying to explain, please hit me up with questions.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/21/13 07:32 PM (12 years ago)
I'm doing some work on my self hosted, and ran across the same issues you're having. The thing is, we're disabling those capabilities in 'one' page, but not all of them, and there are a few. :) And they're all being populated by a function called 'fnGetControlPanelLinks', located in the class.Page.php file in your '<root>/includes' directory. However, the way the data base is setup doesn't lend itself to sorting by privilege, so without making a couple of simple mods to the database and script it isn't going to happen the way we want it to. In the meantime what you're going to have to do is to use a good text editor like Notepad++ or TextWrangler and do a 'site search' for all mentions of <?php echo $thisPage->fnGetControlPanelLinks("application", $appGuid, "block", ""); ?> And in each of those areas, you're going to have to choose what you want your users to see, and what you don't. It could be a few pages, it could be a whole bunch. In my instance, all I want my users to do is be able to see their 'usage map' and the 'send' part of the push queue (not the config part). So, I modified my 'index.php' file, as well as the 'bt_usagemap.php' and 'bt_pushNotifications.php' files. You may have more, or less, depending. Hope this helps, and yell if you have a question. Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/21/13 08:28 PM (12 years ago)
It works beautifully. However yes, you'll have to edit almost every affected page. It doesn't take too long. Depending on the relationship you have with your clients, I've also taken the 'Create New Application' from their view as well. The way I did that was rather drastic, however. Because it is part of the 'Account' group, it was bunched with a few other 'GetControlPanel' links that I wanted to stay (name, password, etc). So what I did was in the database itself, I changed the 'type' from 'Account' to 'Admin'. On refresh, it was removed from all the users control panels. But I can still (from the admin control panel) create an app. When the app is finished, I merely transfer 'ownership' of the app to the user, and they can view usage and create push messages. But nothing else. Cheers! -- Smug
 
Jcommander
Aspiring developer
Profile
Posts: 42
Reg: Feb 04, 2013
Colorado Spring...
11,320
like
03/24/13 08:03 AM (12 years ago)
Thank you for the reply SmugWimp. I have decided to start a little more basic and come back to this particular problem later. For now I am working on trying to understand how to go about taking my app offline. It is a bit confusing, but I have been reading a couple of different how to manuals and podcast's. I'm still confused, but hopefully I can clear it up today.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.