Eclipse set action visible on custom complex conditions - action

I want to restrict, set visible false, some actions in an eclipse rcp application, based on user role.
For example when opening editor A, if the user has admin role, show actions 1-2-3-4, but if the user doesn't have admin role, show only actions 1-2.
The action enablesFor property is too simple for my need.
Is there a way to do this in an eclipse rcp application ?

There are also core expression enabled activities that can be used to hide most action and command contributions that come from a plugin.xml. See How remove pop-up menu contributions in eclipse RCP for an activity example that could be enhanced with an enabledWhen expression.
There's an example of enabling contributions with activities based on a User's Role in the examples contribution plugin: http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.ui.examples.contributions/

You should use the org.eclipse.ui.menus extension point with a visibleWhen to show/hide your contributions. You can define and use property testers to determine whether the current user should be able to see the item or not.
http://wiki.eclipse.org/Menu_Contributions

Related

Disable/Hide/Remove Docs menu in Apache Airflow GUI

I have installed Airflow in my Ubuntu system and trying to deploy Airflow to production. I would like to turn off the menu Docs on the UI (browser).
I was reading setting permissions on the menus here access-control but it is hard to turn off this menu for each role. I am curious to know if we can Disable/Hide/Remove Docs menu from the root.
There's no one-click way to turn it off globally. I wonder why it's hard to turn it off for each role? The only way to truly perform this in one action is to query the metastore directly and remove the menu access on Docs permission from all roles using a single SQL query.
Assuming you don't have too many roles, it takes just a few clicks in the UI. First you'll need Admin permissions and go to Security -> List Roles. In there, edit each role and remove the menu access on Docs permission.

Wagtail:How to have multiple types of admin

I am making a blogging website using wagtail so we have multiple writers so I need that no one can see drafts of other users and only the superadmin can post the blogs but I can't find that setting.
Previewing and submitting pages for moderation
The Save/Preview/Submit for moderation menu is always present at the bottom of the page edit/creation screen. The menu allows you to perform the following actions, dependent on whether you are an editor, moderator [...]
Source: http://docs.wagtail.io/en/v2.3/editor_manual/new_pages/previewing_and_submitting_for_moderation.html
Editors (you call them writers) can submit for moderation. Moderators can publish. So this part of your requirements is built in. My advice is to create users for each type and play around to get a feeling for this workflow.
There is no (out of the box) way to show pages to their creators only. However, you can give groups access to parts of the page tree:
Go to a page in the admin.
Top right, click the Privacy setting. Public is the default.
Change to 'Private, accessible to users in specific groups'.
Choose a group.
Now only users in this group can edit this section. So this page and all it's child pages.
Default there are two groups: Editors and Moderators. You can create new groups via /admin/groups/new/. If you give each user it's own group, you have what you want. Their pages will live in their own part of the page tree though.
Note that when you create a group it is also possible to limit permissions per content type. So you can make a group of users responsible for content of a specific type.
Wagtail users, groups, permissions, workflows and privacy settings makes it possible to configure permissions in a fine grained way. This will be sufficient in most cases.
When you have a project requirement that is more demanding, you can always add some extra logic to meet your requirement. Python/Django/Wagtail is a flexible software stack. But before going there, I would advice you to see if the standard settings are sufficient. If not, you should describe your requirements in more detail.

Cannot add component in draft state Editor role

If I have an item in draft state and I go to Experience Editor, the add new component is disabled and I cannot add any new components for an Editor role.
Any idea where should I look?
It sounds like member Roles are the issue here.
Look into including one of the Designer roles (Designer / Sitecore Client Designing)
From Sitecore security roles documentation:
Sitecore Client Designing
Gives the user access to Experience Editor Design pane features that allow a user to set layout details associated with items in the Sitecore client.
Members of this role are: Designer
and
Designer
Gives the user read and write access to the areas of the content tree
that are required when changing layout details for individual items
and groups of items via template standard values, as well as items
required when configuring the Experience Editor Design Pane.
This role also has two of the Sitecore Client roles assigned to it, so
if you assign just this role to a user, the Sitecore Client Designing
and Sitecore Client Users roles will be automatically assigned to the
user.
This role provides access to the Experience Editor Design Pane
features and the designer options in the Content Editor.
Note This role is not a member of the Author and Authoring roles, so
it does not allow users to edit items.
Members of this role are: Developer
This sounds like a a workflow security issue. I would recommend using the Access Viewer to check the user's access to the item you are trying to edit. If it tells you that there is no access, the right side of the tool should tell you why. If the 'why' is workflow state access, you probably need to adjust your security on the Workflow state for 'Draft'.

ACL for Joomla Component

I have downloaded a 3rd party plugin for Joomla (Breezing Forms). I have created a new user for my Joomla instance who only has access to certain privileges. Breezing Forms is the only component they can use.
I have set these settings correctly from the super user, there is one action, "Configure" which I have set to "allow" for my specific user type.
Now when I log in as that user, I cannot see the components menu (I have disallowed all other components).
But if I navigate to the component:
http://domain.co.uk/administrator/index.php?option=com_breezingforms
Then I can access the page.
I have tried denying access, then trying to access the page and it rightfully prevents me from using it, so the ACL privileges are working, but there is an issue with it displaying in the menu.
I am using Joomla 2.5
Thanks,
Ian
Usually a component has two permissions which deal with that kind of stuff.
core.manage (Access Administration Interface) allows access to the component in the backend. This means the menu item is present in the Components menu.
core.admin (Configure) allows to set the options for this component.
So make sure you have set the correct permissions in BreezingForms. You probably want to have core.manage (Access Administration Interface) and not the other one. Also if you set the Configure one, make sure you also enable the manage one. It doesn't make much sense otherwise.

Applying a Sitecore workflow for a particular user

Is it possible to apply a workflow in Sitecore only for a particular user?
I want to apply a workflow when the editor edits any item, but don't want to apply a workflow on that item in case an Admin edits it. Is that possible?
First Question:
Workflow is applied to an item. Workflow, however, does have security around it. This means that you can have different actions/flows at a user (or role) level.
Second Question:
Users who have the "User is Administrator" checkbox checked on the "edit user screen" will in fact bypass workflow.