Examples of Roles


Examples of org.olat.core.id.Roles

   * Loops over all repository-entries. Index repository meta data.
   * Go further with repository-indexer for certain type if available.
   * @see org.olat.search.service.indexer.Indexer#doIndex(org.olat.search.service.SearchResourceContext, java.lang.Object, org.olat.search.service.indexer.OlatFullIndexer)
   */
  public void doIndex(SearchResourceContext parentResourceContext, Object businessObj, OlatFullIndexer indexWriter) throws IOException,InterruptedException {
    Roles roles = new Roles(true, true, true, true, false, true);
    int counter = 0;
    List repositoryList = repositoryManager.genericANDQueryWithRolesRestriction(null,null,null,null,roles, null);
    if (Tracing.isDebugEnabled(RepositoryIndexer.class)) Tracing.logDebug("RepositoryIndexer repositoryList.size=" + repositoryList.size(), RepositoryIndexer.class);
    // loop over all repository-entries
    Iterator iter = repositoryList.iterator();
View Full Code Here

Examples of org.olat.core.id.Roles

    final String title = course.getCourseTitle();

    simCourseEnv = new PreviewCourseEnvironment(title, runStructure, psf.getDate(), course.getCourseFolderContainer(), course
        .getCourseBaseContainer(),course.getResourceableId(), cpm, cgm, auditman, am);
    simIdentEnv = new IdentityEnvironment();
    simIdentEnv.setRoles(new Roles(false, false, false, isGlobalAuthor, isGuestOnly, false));
    final Identity ident = new PreviewIdentity();
    simIdentEnv.setIdentity(ident);
    //identity must be set before attributes OLAT-4811
    simIdentEnv.setAttributes(psf.getAttributesMap());
  }
View Full Code Here

Examples of org.olat.core.id.Roles

      userDataVC.contextPut("courseTitle", efficiencyStatement.getCourseTitle() + " (" + efficiencyStatement.getCourseRepoEntryKey().toString() + ")");
      userDataVC.contextPut("user", ureq.getIdentity().getUser());     
      userDataVC.contextPut("username", ureq.getIdentity().getName());
      userDataVC.contextPut("date", StringHelper.formatLocaleDateTime(efficiencyStatement.getLastUpdated(), ureq.getLocale()));
     
      Roles roles = ureq.getUserSession().getRoles();
      boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin())
      List<UserPropertyHandler> userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);
      userDataVC.contextPut("userPropertyHandlers", userPropertyHandlers);
     
      Controller identityAssessmentCtr = new IdentityAssessmentOverviewController(ureq, wControl, efficiencyStatement.getAssessmentNodes());
      listenTo(identityAssessmentCtr);//dispose it when this one is disposed
View Full Code Here

Examples of org.olat.core.id.Roles

   * @param restrictedType
   * @param roles
   * @return Results
   */
  public List queryByTypeLimitAccess(String restrictedType, UserRequest ureq) {
    Roles roles = ureq.getUserSession().getRoles();
    String institution = "";
    institution = ureq.getIdentity().getUser().getProperty("institutionalName", null);
    if(!roles.isOLATAdmin() && institution != null && institution.length() > 0 && roles.isInstitutionalResourceManager()) {
      StringBuilder query = new StringBuilder(400);
      query.append("select distinct v from org.olat.repository.RepositoryEntry v inner join fetch v.olatResource as res"
          + ", org.olat.basesecurity.SecurityGroupMembershipImpl as sgmsi"
          + ", org.olat.basesecurity.IdentityImpl identity"
          + ", org.olat.user.UserImpl user "
View Full Code Here

Examples of org.olat.core.id.Roles

              usess = UserSession.getUserSession(request);
              usess.signOffAndClear();
              usess.setIdentity(identity);
              UserDeletionManager.getInstance().setIdentityAsActiv(identity);
              // set the roles (admin, author, guest)
              Roles roles = ManagerFactory.getManager().getRoles(identity);
              usess.setRoles(roles);
              // set authprovider
              //usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);
           
              // set session info
View Full Code Here

Examples of org.olat.core.id.Roles

      //
      String firstItem = publiclyReadableFolders.get(0);
      // If the first value in the list is '*', list all resource folders.
      if (firstItem != null && firstItem.equals("*")) {
        // fake role that represents normally logged in user
        Roles registeredUserRole = new Roles(false, false, false, false, false, false);
        List<RepositoryEntry> allEntries = (List<RepositoryEntry>) repoManager.queryByTypeLimitAccess(SharedFolderFileResource.TYPE_NAME,
            registeredUserRole);
        for (RepositoryEntry entry : allEntries) {
          addReadonlyFolder(rootContainer, entry, sfm, addedEntries);
        }
View Full Code Here

Examples of org.olat.core.id.Roles

        // I18nManager.getInstance().getDefaultLocale().toString();
        Identity ident = ManagerFactory.getManager().findIdentityByName("administrator");

        usess.signOffAndClear();
        usess.setIdentity(ident);
        usess.setRoles(new Roles(true, true, true, true, false, true));
        usess.setLocale(I18nManager.getInstance().getLocaleOrDefault(ident.getUser().getPreferences().getLanguage()));

        // brasato:: was
        // Windows.getWindows(ureq).getWindowManager().getGlobalSettings().setFontSize(
        // identity.getUser().getPreferences().getFontsize() );
View Full Code Here

Examples of org.olat.core.id.Roles

  /**
   * @param identity
   * @return The filtered Items
   */
  public List<Item> getFilteredItems(FeedSecurityCallback callback, Identity identity) {
    final Roles roles = ManagerFactory.getManager().getRoles(identity);
    if (roles != null) {
      boolean admin = roles.isOLATAdmin();
      if (admin || isExternal()) {
        // An admin can see all items and everybody can see all items of
        // external feeds
        return items;
      }
View Full Code Here

Examples of org.olat.core.id.Roles

  public boolean synchronizeLearningGroupsWithIMServer() {
    log.info("Starting synchronisation of LearningGroups with IM server");
    RepositoryManager rm = RepositoryManager.getInstance();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    //pull as admin
    Roles roles = new Roles(true, true, true, true, false, true);
    List<RepositoryEntry> allCourses = rm.queryByTypeLimitAccess(CourseModule.getCourseTypeName(), roles);
    int counter = 0;
    for (Iterator<RepositoryEntry> iterator = allCourses.iterator(); iterator.hasNext();) {
      RepositoryEntry entry = iterator.next();
      ICourse course = null;
View Full Code Here

Examples of org.olat.core.id.Roles

    }
    return selKeys;
  }
 
  private String[] getColsChoiceKeys(UserRequest ureq) { 
    Roles roles = ureq.getUserSession().getRoles();
    boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin())
    List<UserPropertyHandler> userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);
    Iterator<UserPropertyHandler> propertyIterator =  userPropertyHandlers.iterator();
    ArrayList<String> array = new ArrayList<String>();
    //add username first, next the user properties
    array.add("username");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.