Hide Liferay control panel options form users - liferay

I am developing a liferay portlet using liferay6.1 and SDK for Java.
When user logs in and they click on control panel they can see all kind of options. Is there a way to hide this options?
I am still new but i think that you can hide it from the portal.ext.properties but I am not sure and I have no idea.
Any help will be appreciated!
Thanks in advance!

You can show/hide control panel entries by implementing the interface com.liferay.portlet.ControlPanelEntry. This interface defines a couple of methods (isVisible/hasAccessPermission) that determine if a particular user sees/has access to one of the control panel entries.
The association between a portlet and its ControlPanelEntry class is defined in the liferay-portlet.xml configuration file. To override its value, you must use the ext-plugin.
Take a look at http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd for more information (search for control-panel-entry).

The configuration can be do by role-permissions of user and power-user. Go to "Control Panel" -> "Roles" -> Looking for User-Role (then Power-User) -> Define Permissions. Disable in area "Permission for Control Panel" the View-Permission for Items that must be hide.
Over.

Hide and disable access to liferay control panel
This blog will help you

Related

How to edit default portlet in Liferay 7 Control Panel?

Is it possible to edit portlet/page in Control Panel in Liferay 7.0 ga4?
In my case, I want to add a custom column in Users table in 'Users and Organizations' section.
Yes, it's possible, and you do so just like you'd do for any other stock portlet. While there are extra mechanics to make them appear in control panel, you don't need to get in contact with these if you just modify.
Inspect the Dom to get a hint for the portlet that you're looking for.
An alternative that'd be better maintainable would be to write your own portlet instead of modifying an existing one. But that's not what you ask for here.

How to hide URL Selector content tab?

I am creating a custom webpart using the Url Selector from kentico. I want the user to select content just from the Media Library. I went to form controls -> Url Selector -> Properties -> Dialogs_Content_Hide -> Default Value -> Yes and it still showing it in the Web Part. If I select the Dialogs_Web_Hide, Dialogs_Libraries_Hide and select the yes option in the default values, they hide, all except the Content_Dialogs.
Is this a bug? Or its something wrong?
Here is an example of the tabs
First set the form controls properties back to the way they were. If you don't, it will cause all kinds of problems later on.
Secondly, when you create the property in the webpart in the UI, select the URL selector form control for your text fields control. The scroll down just a bit and under the Editing Control Settings you'll see an "Configure" link. Click it. In there you will be able to tell the form control what tabs you want to enable and disable.
To add to Brenden's answer; if this is something you need to do a lot for your current build, then I'd also suggest making a copy of the Url selector form control and customize the properties as you originally mentioned. This way, you leave the default control in place for the system and have a control tailored to your needs. I've done this just now to check with a new form control that I called Media URL selector. Do make sure that you select the same source file as the original control in the Cloned form control file name property - Kentico by default will try to locate a new file called <original filename>_1.ascx. The reason for this is that admin section of your site also makes use of this control, so you may cause a nasty side effect somewhere else in the system.
As for why the settings had no effect; these are the default values you are setting. If you already have the form control in use, then the default setting would have been applied as they originally were. If you find one of the fields in question, you can change the control type to Text box, click Save, and then reassign it to Media URL selector.

Design-time support on composite control

I'm creating a specific DataGridView control that includes two scrollbars so that I can control their size and visibility. So, I have created a User control that contains the DataGridView and the two scrollbars inside a 2x2 TableLayoutPanel.
The issue I'm facing is that when I add my control to a Windows Form, I can't set my DataGridView's DataSource or define the column styles from the design view, because the link that I use for that when I use a common DataGridView (that little white arrow appearing on the top right side of the DataGridView) is not appearing.
While doing some testing, I saw that if I inherit my control from DataGridView, that link appears. But if I do that, I guess that I can only extend the functionality for the DataGridView, but I need my control to be a composite control.
So, that's my question: how can I get those design-time capabilities on my custom control? I am specially interested on the columns layout and the datasource.
Best regards.
If you are doing a usercontrol (a control that has an .ascx codebehind file) there seems to be no way to control this:
How to hide the inner controls of a UserControl in the Designer?
If you are doing a WebControl (a class that inehrits from WebControl with no .ascx file) you may create your own designer and maybe somehow output the designers of both conrols. Have a look at: http://msdn.microsoft.com/en-us/library/12yydcke.aspx it explains how to create a webcontrol and its desgner.
Some things with usercontrols/webcontrols seem to be easy but are hard to implement...
Hope this helps!

SidebarPane on extension panel

I have created panel and know I want to create SidebarPane for my extension.
Method chrome.devtools.panels.elements.createSidebarPane allow me create panel for "Elements" panel.
Can I do the same thing but for my own panel?
Thank you in advance!
This isn't currently possible, except by implements the 'elements panel' implementation by yourself. The feature can be requested at crbug.com.

Winforms c# outlook like Interface

I have already asked the same question but in regards with MDI Application design. Now just for R&D purpose so that we can go with 2 solutions to our user. Can somebody plz help me out...
We are developing an OutLook Style Application using C# Winforms. In that application we are using Microsoft Table Control. Which is what we need to show our UI. In the left hand pane we have menu and in the right hand we are displaying our UserControl. Like CustomerManager. This UserControl is doing Adding, Updating, Deleting ect etc but we want to put the common action buttons, Like Add,Delete,Save on the top toolbar.
So far so good, Now what we need to acheve is regardless of UserControl. What ever UserControl is loaded in the MainForm's TableControl. When the save button is clicked it should process the data on that UserControl. Obviously we will write the logic of the Save Action on each UserControl.
Please help...
Regards
Shanx
I may advice you the Krypton Toolkit. You will write an Outlook style app in seconds.
For all who ended up here like me in search of a free toolkit: As Vulkanino suggested to use Krypton, I loooked it up.
This is now open source Freeware and can be found unter: Krypton Toolkit
Create a Base user control that contains your Add, Delete, Save methods and events. Then create every other functional control that inherits from the Base control.
When you action the main toolbar buttons, you can safely cast each user control in your given container, to the Base user control.
Some MSDN links you might want to read up on:
http://msdn.microsoft.com/en-us/library/44a9ty12(VS.80).aspx
http://msdn.microsoft.com/en-us/library/ms173149(VS.80).aspx

Resources