本文整理汇总了Java中org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy类的典型用法代码示例。如果您正苦于以下问题:Java MetaDataRoleAuthorizationStrategy类的具体用法?Java MetaDataRoleAuthorizationStrategy怎么用?Java MetaDataRoleAuthorizationStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MetaDataRoleAuthorizationStrategy类属于org.apache.wicket.authroles.authorization.strategies.role.metadata包,在下文中一共展示了MetaDataRoleAuthorizationStrategy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ApprovalDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public ApprovalDirectoryPanel(final String id, final PageReference pageReference) {
super(id, pageReference, true);
disableCheckBoxes();
setFooterVisibility(false);
modal.size(Modal.Size.Large);
addOuterObject(manageApprovalModal);
manageApprovalModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 8804221891699487139L;
@Override
public void onClose(final AjaxRequestTarget target) {
updateResultTable(target);
((BasePage) pageReference.getPage()).getApprovalsWidget().refreshLatestAlerts(target);
manageApprovalModal.show(false);
}
});
restClient = new UserWorkflowRestClient();
initResultTable();
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.WORKFLOW_FORM_SUBMIT);
}
开发者ID:apache,项目名称:syncope,代码行数:27,代码来源:ApprovalDirectoryPanel.java
示例2: RoleDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
protected RoleDirectoryPanel(final String id, final Builder builder) {
super(id, builder);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.ROLE_CREATE);
setReadOnly(!SyncopeConsoleSession.get().owns(StandardEntitlement.ROLE_UPDATE));
disableCheckBoxes();
setShowResultPage(true);
modal.size(Modal.Size.Large);
initResultTable();
addOuterObject(utilityModal);
setWindowClosedReloadCallback(utilityModal);
utilityModal.size(Modal.Size.Large);
utilityModal.addSubmitButton();
addOuterObject(membersModal);
membersModal.size(Modal.Size.Large);
}
开发者ID:apache,项目名称:syncope,代码行数:20,代码来源:RoleDirectoryPanel.java
示例3: DashboardControlPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public DashboardControlPanel(final String id, final PageReference pageRef) {
super(id);
JobWidget job = new JobWidget("job", pageRef);
MetaDataRoleAuthorizationStrategy.authorize(job, Component.RENDER,
String.format("%s,%s,%s",
StandardEntitlement.NOTIFICATION_LIST,
StandardEntitlement.TASK_LIST,
StandardEntitlement.REPORT_LIST));
add(job);
ReconciliationWidget reconciliation = new ReconciliationWidget("reconciliation", pageRef);
MetaDataRoleAuthorizationStrategy.authorize(job, Component.RENDER,
String.format("%s,%s,%s",
StandardEntitlement.REPORT_EXECUTE,
StandardEntitlement.REPORT_READ,
StandardEntitlement.REPORT_LIST));
add(reconciliation);
}
开发者ID:apache,项目名称:syncope,代码行数:20,代码来源:DashboardControlPanel.java
示例4: ReportletDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public ReportletDirectoryPanel(
final BaseModal<ReportTO> baseModal, final String report, final PageReference pageRef) {
super(BaseModal.CONTENT_ID, pageRef, false);
disableCheckBoxes();
this.baseModal = baseModal;
this.report = report;
this.restClient = new ReportRestClient();
enableExitButton();
this.addNewItemPanelBuilder(
new ReportletWizardBuilder(report, new ReportletWrapper(true), pageRef), true);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.REPORT_UPDATE);
initResultTable();
}
开发者ID:apache,项目名称:syncope,代码行数:19,代码来源:ReportletDirectoryPanel.java
示例5: addCustomActions
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
@Override
protected void addCustomActions(final ActionsPanel<PullPolicyTO> panel, final IModel<PullPolicyTO> model) {
panel.add(new ActionLink<PullPolicyTO>() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target, final PullPolicyTO ignore) {
target.add(policySpecModal.setContent(
new PullPolicyModalPanel(model.getObject(), policySpecModal, pageRef)));
policySpecModal.header(new StringResourceModel(
"policy.rules", PullPolicyDirectoryPanel.this, Model.of(model.getObject())));
MetaDataRoleAuthorizationStrategy.authorize(
policySpecModal.getForm(), ENABLE, StandardEntitlement.POLICY_UPDATE);
policySpecModal.show(true);
}
}, ActionLink.ActionType.COMPOSE, StandardEntitlement.POLICY_UPDATE);
}
开发者ID:apache,项目名称:syncope,代码行数:22,代码来源:PullPolicyDirectoryPanel.java
示例6: addCustomActions
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
@Override
protected void addCustomActions(final ActionsPanel<AccountPolicyTO> panel, final IModel<AccountPolicyTO> model) {
panel.add(new ActionLink<AccountPolicyTO>() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target, final AccountPolicyTO ignore) {
target.add(ruleCompositionModal.setContent(new PolicyRuleDirectoryPanel<>(
ruleCompositionModal, model.getObject().getKey(), PolicyType.ACCOUNT, pageRef)));
ruleCompositionModal.header(new StringResourceModel(
"policy.rules", AccountPolicyDirectoryPanel.this, Model.of(model.getObject())));
MetaDataRoleAuthorizationStrategy.authorize(
ruleCompositionModal.getForm(), ENABLE, StandardEntitlement.POLICY_UPDATE);
ruleCompositionModal.show(true);
}
}, ActionLink.ActionType.COMPOSE, StandardEntitlement.POLICY_UPDATE);
}
开发者ID:apache,项目名称:syncope,代码行数:22,代码来源:AccountPolicyDirectoryPanel.java
示例7: PolicyRuleDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
protected PolicyRuleDirectoryPanel(
final BaseModal<T> baseModal, final String policy, final PolicyType type, final PageReference pageRef) {
super(BaseModal.CONTENT_ID, pageRef, false);
disableCheckBoxes();
this.baseModal = baseModal;
this.policy = policy;
this.restClient = new PolicyRestClient();
enableExitButton();
this.addNewItemPanelBuilder(
new PolicyRuleWizardBuilder(policy, type, new PolicyRuleWrapper(true), pageRef), true);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.POLICY_UPDATE);
initResultTable();
}
开发者ID:apache,项目名称:syncope,代码行数:19,代码来源:PolicyRuleDirectoryPanel.java
示例8: addCustomActions
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
@Override
protected void addCustomActions(final ActionsPanel<PasswordPolicyTO> panel, final IModel<PasswordPolicyTO> model) {
panel.add(new ActionLink<PasswordPolicyTO>() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target, final PasswordPolicyTO ignore) {
target.add(ruleCompositionModal.setContent(new PolicyRuleDirectoryPanel<>(
ruleCompositionModal, model.getObject().getKey(), PolicyType.PASSWORD, pageRef)));
ruleCompositionModal.header(new StringResourceModel(
"policy.rules", PasswordPolicyDirectoryPanel.this, Model.of(model.getObject())));
MetaDataRoleAuthorizationStrategy.authorize(
ruleCompositionModal.getForm(), ENABLE, StandardEntitlement.POLICY_UPDATE);
ruleCompositionModal.show(true);
}
}, ActionLink.ActionType.COMPOSE, StandardEntitlement.POLICY_UPDATE);
}
开发者ID:apache,项目名称:syncope,代码行数:22,代码来源:PasswordPolicyDirectoryPanel.java
示例9: CoreAuthorizationStrategy
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public CoreAuthorizationStrategy(final IRoleCheckingStrategy roleCheckingStrategy,
IAuthenticationService authenticationService,
PermissionFactory permissionFactory) {
add(new AnnotationsRoleAuthorizationStrategy(roleCheckingStrategy));
add(new MetaDataRoleAuthorizationStrategy(roleCheckingStrategy));
add(new AnnotationsPermissionAuthorizationStrategy(authenticationService, permissionFactory));
}
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:8,代码来源:CoreAuthorizationStrategy.java
示例10: updateTree
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
private void updateTree() {
tree = new LinkTree("treeTable", roleTreeBuilder.build()) {
private static final long serialVersionUID = -5514696922119256101L;
@Override
protected IModel getNodeTextModel(final IModel model) {
return new PropertyModel(model, "userObject.displayName");
}
@Override
protected void onNodeLinkClicked(final Object node,
final BaseTree baseTree, final AjaxRequestTarget target) {
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;
RoleTO unitObject = (RoleTO) treeNode.getUserObject();
send(getPage(), Broadcast.BREADTH,
new TreeNodeClickUpdate(target, unitObject.getId()));
}
};
MetaDataRoleAuthorizationStrategy.authorize(
tree, ENABLE,
xmlRolesReader.getAllAllowedRoles("Roles", "read"));
tree.setOutputMarkupId(true);
tree.getTreeState().expandAll();
treeContainer.addOrReplace(tree);
}
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:34,代码来源:TreeRolePanel.java
示例11: ProjectSelectionPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public ProjectSelectionPanel(String id, IModel<Project> aModel)
{
super(id);
overviewList = new OverviewListChoice<>("project");
overviewList.setChoiceRenderer(new ChoiceRenderer<>("name"));
overviewList.setModel(aModel);
overviewList.setChoices(LambdaModel.of(this::listProjects));
overviewList.add(new LambdaAjaxFormComponentUpdatingBehavior("change", this::onChange));
add(overviewList);
add(createLink = new LambdaAjaxLink("create", this::actionCreate));
MetaDataRoleAuthorizationStrategy.authorize(createLink, Component.RENDER, StringUtils.join(
new String[] { Role.ROLE_ADMIN.name(), Role.ROLE_PROJECT_CREATOR.name() }, ","));
}
开发者ID:webanno,项目名称:webanno,代码行数:16,代码来源:ProjectSelectionPanel.java
示例12: ProjectPage
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public ProjectPage()
{
selectedProject = Model.of();
tabPanel = new BootstrapAjaxTabbedPanel<ITab>("tabPanel", makeTabs()) {
private static final long serialVersionUID = -7356420977522213071L;
@Override
protected void onConfigure()
{
super.onConfigure();
setVisible(selectedProject.getObject() != null);
}
};
tabPanel.setOutputMarkupPlaceholderTag(true);
add(tabPanel);
projects = new ProjectSelectionPanel("projects", selectedProject);
projects.setCreateAction(target -> selectedProject.setObject(new Project()));
projects.setChangeAction(target -> {
target.add(tabPanel);
// Make sure that any invalid forms are cleared now that we load the new project.
// If we do not do this, then e.g. input fields may just continue showing the values
// they had when they were marked invalid.
tabPanel.visitChildren(new ModelChangedVisitor(selectedProject));
});
add(projects);
importProjectPanel = new ProjectImportPanel("importPanel", selectedProject);
add(importProjectPanel);
MetaDataRoleAuthorizationStrategy.authorize(importProjectPanel, Component.RENDER,
"ROLE_ADMIN");
}
开发者ID:webanno,项目名称:webanno,代码行数:34,代码来源:ProjectPage.java
示例13: ITabComponent
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
/**
* Constructor.
*
* @param title IModel used to represent the title of the tab. Must contain a string
* @param roles authorized roles
*/
public ITabComponent(final IModel<String> title, final String... roles) {
super(UUID.randomUUID().toString());
this.title = title;
final ActionPermissions permissions = new ActionPermissions();
setMetaData(MetaDataRoleAuthorizationStrategy.ACTION_PERMISSIONS, permissions);
if (roles == null || roles.length == 0) {
permissions.authorizeAll(RENDER);
} else {
permissions.authorize(RENDER, new Roles(roles));
}
}
开发者ID:apache,项目名称:syncope,代码行数:19,代码来源:ITabComponent.java
示例14: Workflow
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public Workflow(final PageParameters parameters) {
super(parameters);
body.add(BookmarkablePageLinkBuilder.build("dashboard", "dashboardBr", Dashboard.class));
WebMarkupContainer content = new WebMarkupContainer("content");
content.setOutputMarkupId(true);
body.add(content);
WebMarkupContainer disabled = new WebMarkupContainer("disabled");
disabled.setOutputMarkupPlaceholderTag(true);
content.add(disabled);
WizardMgtPanel<WorkflowDefinitionTO> workflowsPanel = new WorkflowDirectoryPanel.Builder(getPageReference()) {
private static final long serialVersionUID = -5960765294082359003L;
}.disableCheckBoxes().build("workflowsPanel");
workflowsPanel.setOutputMarkupPlaceholderTag(true);
MetaDataRoleAuthorizationStrategy.authorize(workflowsPanel, ENABLE, StandardEntitlement.WORKFLOW_DEF_LIST);
content.add(workflowsPanel);
if (SyncopeConsoleSession.get().getPlatformInfo().getUserWorkflowAdapter().contains("Flowable")) {
disabled.setVisible(false);
} else {
workflowsPanel.setVisible(false);
}
}
开发者ID:apache,项目名称:syncope,代码行数:30,代码来源:Workflow.java
示例15: DashboardAccessTokensPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public DashboardAccessTokensPanel(final String id, final PageReference pageRef) {
super(id);
WizardMgtPanel<AccessTokenTO> accessTokens = new AccessTokenDirectoryPanel.Builder(pageRef) {
private static final long serialVersionUID = -5960765294082359003L;
}.disableCheckBoxes().build("accessTokens");
MetaDataRoleAuthorizationStrategy.authorize(
accessTokens, Component.RENDER, StandardEntitlement.ACCESS_TOKEN_LIST);
add(accessTokens);
}
开发者ID:apache,项目名称:syncope,代码行数:13,代码来源:DashboardAccessTokensPanel.java
示例16: getColumns
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
@Override
protected List<IColumn<JobTO, String>> getColumns() {
List<IColumn<JobTO, String>> columns = new ArrayList<>();
columns.add(new PropertyColumn<>(new ResourceModel("refDesc"), "refDesc", "refDesc"));
columns.add(new BooleanPropertyColumn<>(new ResourceModel("scheduled"), "scheduled", "scheduled"));
columns.add(new DatePropertyColumn<>(new ResourceModel("start"), "start", "start"));
columns.add(new AbstractColumn<JobTO, String>(new Model<>(""), "running") {
private static final long serialVersionUID = -4008579357070833846L;
@Override
public void populateItem(
final Item<ICellPopulator<JobTO>> cellItem,
final String componentId,
final IModel<JobTO> rowModel) {
JobTO jobTO = rowModel.getObject();
JobActionPanel panel =
new JobActionPanel(componentId, jobTO, JobWidget.this, pageRef);
MetaDataRoleAuthorizationStrategy.authorize(panel, WebPage.ENABLE,
String.format("%s,%s%s,%s",
StandardEntitlement.TASK_EXECUTE,
StandardEntitlement.REPORT_EXECUTE,
StandardEntitlement.TASK_UPDATE,
StandardEntitlement.REPORT_UPDATE));
cellItem.add(panel);
}
@Override
public String getCssClass() {
return "col-xs-1";
}
});
return columns;
}
开发者ID:apache,项目名称:syncope,代码行数:41,代码来源:JobWidget.java
示例17: ReportDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
protected ReportDirectoryPanel(final MultilevelPanel multiLevelPanelRef, final PageReference pageRef) {
super(MultilevelPanel.FIRST_LEVEL_ID, pageRef, true);
this.restClient = new ReportRestClient();
this.addNewItemPanelBuilder(new ReportWizardBuilder(new ReportTO(), pageRef), true);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.REPORT_CREATE);
modal.size(Modal.Size.Large);
initResultTable();
startAt = new ReportStartAtTogglePanel(container, pageRef);
addInnerObject(startAt);
}
开发者ID:apache,项目名称:syncope,代码行数:14,代码来源:ReportDirectoryPanel.java
示例18: PullPolicyDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public PullPolicyDirectoryPanel(final String id, final PageReference pageRef) {
super(id, PolicyType.PULL, pageRef);
final PullPolicyTO defaultItem = new PullPolicyTO();
this.addNewItemPanelBuilder(
new PolicyModalPanelBuilder<>(defaultItem, modal, pageRef), true);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.POLICY_CREATE);
initResultTable();
}
开发者ID:apache,项目名称:syncope,代码行数:12,代码来源:PullPolicyDirectoryPanel.java
示例19: AccountPolicyDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public AccountPolicyDirectoryPanel(final String id, final PageReference pageRef) {
super(id, PolicyType.ACCOUNT, pageRef);
this.addNewItemPanelBuilder(new PolicyModalPanelBuilder<>(new AccountPolicyTO(), modal, pageRef), true);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.POLICY_CREATE);
initResultTable();
}
开发者ID:apache,项目名称:syncope,代码行数:9,代码来源:AccountPolicyDirectoryPanel.java
示例20: PasswordPolicyDirectoryPanel
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入依赖的package包/类
public PasswordPolicyDirectoryPanel(final String id, final PageReference pageRef) {
super(id, PolicyType.PASSWORD, pageRef);
this.addNewItemPanelBuilder(
new PolicyModalPanelBuilder<>(new PasswordPolicyTO(), modal, pageRef), true);
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.POLICY_CREATE);
initResultTable();
}
开发者ID:apache,项目名称:syncope,代码行数:10,代码来源:PasswordPolicyDirectoryPanel.java
注:本文中的org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论