当前位置: 首页>>代码示例>>Java>>正文


Java MetaDataRoleAuthorizationStrategy.authorize方法代码示例

本文整理汇总了Java中org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize方法的典型用法代码示例。如果您正苦于以下问题:Java MetaDataRoleAuthorizationStrategy.authorize方法的具体用法?Java MetaDataRoleAuthorizationStrategy.authorize怎么用?Java MetaDataRoleAuthorizationStrategy.authorize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy的用法示例。


在下文中一共展示了MetaDataRoleAuthorizationStrategy.authorize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: getLocationFragment

import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; //导入方法依赖的package包/类
private Fragment getLocationFragment(final TopologyNode node, final PageReference pageRef) {
    Fragment fragment = new Fragment("actions", "locationActions", this);

    AjaxLink<String> create = new IndicatingAjaxLink<String>("create") {

        private static final long serialVersionUID = 3776750333491622263L;

        @Override
        public void onClick(final AjaxRequestTarget target) {
            final ConnInstanceTO modelObject = new ConnInstanceTO();
            modelObject.setLocation(node.getKey());

            final IModel<ConnInstanceTO> model = new CompoundPropertyModel<>(modelObject);
            modal.setFormModel(model);

            target.add(modal.setContent(new ConnectorWizardBuilder(modelObject, pageRef).
                    build(BaseModal.CONTENT_ID, AjaxWizard.Mode.CREATE)));

            modal.header(new Model<>(MessageFormat.format(getString("connector.new"), node.getKey())));
            modal.show(true);
        }

        @Override
        public String getAjaxIndicatorMarkupId() {
            return Constants.VEIL_INDICATOR_MARKUP_ID;
        }

    };
    fragment.add(create);
    MetaDataRoleAuthorizationStrategy.authorize(create, RENDER, StandardEntitlement.CONNECTOR_CREATE);

    return fragment;
}
 
开发者ID:apache,项目名称:syncope,代码行数:34,代码来源:TopologyTogglePanel.java


注:本文中的org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。