Package org.candlepin.auth

Examples of org.candlepin.auth.SystemPrincipal


    @SuppressWarnings("unchecked")
    public void scheduleJob(Class job, String jobName, Trigger trigger)
        throws PinsetterException {
        JobDataMap map = new JobDataMap();
        map.put(PinsetterJobListener.PRINCIPAL_KEY, new SystemPrincipal());

        JobDetail detail = newJob(job)
            .withIdentity(jobName, CRON_GROUP)
            .usingJobData(map)
            .build();
View Full Code Here


    private void compileRules(RulesCurator rulesCurator) {
        scriptLock.writeLock().lock();
        try {
            // XXX: we need a principal to access the rules,
            // but pushing and popping system principal could be a bad idea
            Principal systemPrincipal = new SystemPrincipal();
            ResteasyProviderFactory.pushContext(Principal.class, systemPrincipal);
            // Check to see if we need to recompile. we do this inside the write lock
            // just to avoid race conditions where we might double compile
            Date newUpdated = rulesCurator.getUpdated();
            if (newUpdated.equals(this.updated)) {
View Full Code Here

        // the default user service adapter, and no other users exist already:
        if (userService instanceof DefaultUserServiceAdapter &&
            userCurator.getUserCount() == 0) {
            // Push the system principal so we can create all these entries as a
            // superuser:
            ResteasyProviderFactory.pushContext(Principal.class, new SystemPrincipal());

            log.info("Creating default super admin.");
            User defaultAdmin = new User("admin", "admin", true);
            userService.createUser(defaultAdmin);
            return "Initialized!";
View Full Code Here

    @Override
    public void onEvent(Event event) {
        // We're outside of a web request here, need to create this event and satisfy the
        // access control interceptor.
        Principal systemPrincipal = new SystemPrincipal();
        ResteasyProviderFactory.pushContext(Principal.class, systemPrincipal);
        if (log.isDebugEnabled()) {
            log.debug("Received event: " + event);
        }
View Full Code Here

TOP

Related Classes of org.candlepin.auth.SystemPrincipal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.