Uploaded image for project: 'Zanata'
  1. ZNTA-615

Glossarist/-admin not getting glossary-update permission

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: High
    • Resolution: Ready for Release
    • Affects Version/s: server-3.7.0
    • Fix Version/s: server-3.7.2
    • Component/s: None
    • Labels:
    • Environment:
      Firefox, linux
    • Sprint:
      15.14, 15.15

      Description

      I have a user that has glossarist and glossary-admin roles. When accessing the editor, they are unable to edit the glossary entries as they are not granted the glossary-update permission.

      1. Log in as glossarist/glossary-admin
      2. Go to a document to begin editing
      3. Search for a "known word" in the glossary search field
      4. Press the button for a glossary result

      Actual:
      All fields are grey, save is disabled. Glossary-update not granted

      Expected:
      Glossarist should have glossary-update permission

      Other points:

      • They are a member of the target language
      • They have both glossarist and glossary-admin roles
      • Does not seem to be caused by the recent Seam security change

      I traced this back a bit in code, to ZanataIdentity.java, and hasPermission(object, string) returns false:

      2015-08-14T00:32:31,457Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) App server release codename: Kenny
      2015-08-14T00:32:31,457Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) App server release version: 1.0.1.Final
      2015-08-14T00:32:31,458Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) WildFly Full version: 9.0.1.Final
      2015-08-14T00:32:31,462Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Application version: 3.8.0-SNAPSHOT
      2015-08-14T00:32:31,462Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) SCM: git-server-3.6.2-605-g9d0387e
      2015-08-14T00:32:31,463Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Red Hat Inc 2008-2015
      2015-08-14T00:32:31,463Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) ============================================
      2015-08-14T00:32:31,464Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Internal authentication: enabled
      2015-08-14T00:32:31,464Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) OpenID authentication: enabled
      2015-08-14T00:32:31,465Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Enable copyTrans: true
      2015-08-14T00:32:31,465Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) JavaMelody stats directory: /home/djansen/zanata/stats
      2015-08-14T00:32:31,465Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Lucene index directory: /home/djansen/zanata/indexes
      2015-08-14T00:32:31,504Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Mail Session (JNDI): java:jboss/mail/Default
      2015-08-14T00:32:31,505Z INFO [org.zanata.webtrans.server.TranslationWorkspaceManagerImpl] (ServerService Thread Pool – 58) starting...
      2015-08-14T00:32:31,505Z INFO [org.zanata.ZanataInit] (ServerService Thread Pool – 58) Started Zanata...
      2015-08-14T00:32:31,589Z INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool – 58) Initializing Mojarra 2.1.29-01 (-SNAPSHOT 20150130-0749 https://svn.java.net/svn/mojarra~svn/tags/2.1.29-01@14276) for context '/zanata'
      2015-08-14T00:32:35,164Z INFO [org.richfaces.log.Cache] (ServerService Thread Pool – 58) Using cache configuration: vfs:/content/zanata.war/WEB-INF/classes/ehcache.xml
      2015-08-14T00:32:35,169Z INFO [org.richfaces.log.Cache] (ServerService Thread Pool – 58) Selected [org.richfaces.cache.EhCacheCacheFactory]
      2015-08-14T00:32:35,170Z INFO [org.richfaces.log.Cache] (ServerService Thread Pool – 58) Creating EhCache cache instance
      2015-08-14T00:32:35,175Z INFO [org.richfaces.log.Application] (ServerService Thread Pool – 58) RichFaces Core by JBoss by Red Hat, version 4.5.4.Final
      2015-08-14T00:32:35,178Z WARNING [org.richfaces.log.Application] (ServerService Thread Pool – 58) JMS API was found on the classpath; if you want to enable RichFaces Push JMS integration, set context-param 'org.richfaces.push.jms.enabled' in web.xml
      2015-08-14T00:32:35,235Z INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 58) WFLYUT0021: Registered web context: /zanata
      2015-08-14T00:32:35,312Z INFO [org.jboss.as.server] (ServerService Thread Pool – 31) WFLYSRV0010: Deployed "zanata.war" (runtime-name : "zanata.war")
      2015-08-14T00:32:35,315Z INFO [org.jboss.as.server] (ServerService Thread Pool – 31) WFLYSRV0010: Deployed "mysql-connector-java.jar" (runtime-name : "mysql-connector-java.jar")
      2015-08-14T00:32:35,623Z INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
      2015-08-14T00:32:35,624Z INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
      2015-08-14T00:32:35,624Z INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) started in 56604ms - Started 483 of 656 services (240 services are lazy, passive or on-demand)
      2015-08-14T00:41:43,013Z INFO [org.jboss.as.repository] (ServerService Thread Pool – 55) WFLYDR0009: Content /usr/share/wildfly901final/standalone/data/content/72/16cd7d8b6f2efbeb96c4df26624559e94f27c8 is obsolete and will be removed
      2015-08-14T00:41:43,051Z INFO [org.jboss.as.repository] (ServerService Thread Pool – 55) WFLYDR0002: Content removed from location /usr/share/wildfly901final/standalone/data/content/72/16cd7d8b6f2efbeb96c4df26624559e94f27c8/content
      2015-08-14T00:43:34,181Z INFO [org.jboss.seam.servlet.SeamFilter] (default task-1) Initializing filter: org.jboss.seam.web.exceptionFilter
      2015-08-14T00:43:34,182Z INFO [org.jboss.seam.servlet.SeamFilter] (default task-1) Initializing filter: org.jboss.seam.web.multipartFilter
      2015-08-14T00:43:34,182Z INFO [org.jboss.seam.servlet.SeamFilter] (default task-1) Initializing filter: org.jboss.seam.web.loggingFilter
      2015-08-14T00:43:34,187Z INFO [io.undertow.servlet] (default task-1) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: status display enabled, path set to /rwstatus
      2015-08-14T00:43:34,253Z INFO [io.undertow.servlet] (default task-1) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
      2015-08-14T00:43:37,259Z WARNING [javax.enterprise.resource.webcontainer.jsf.context] (default task-3) JSF1091: No mime type could be found for file script/jquery.min.map. To resolve this, add a mime-type mapping to the applications web.xml.
      2015-08-14T00:43:45,769Z WARNING [javax.enterprise.resource.webcontainer.jsf.context] (default task-6) JSF1091: No mime type could be found for file script/jquery.min.map. To resolve this, add a mime-type mapping to the applications web.xml.
      2015-08-14T00:43:55,588Z WARNING [javax.enterprise.resource.webcontainer.jsf.context] (default task-13) JSF1091: No mime type could be found for file script/jquery.min.map. To resolve this, add a mime-type mapping to the applications web.xml.
      2015-08-14T00:44:01,364Z INFO [org.zanata.webtrans.server.TranslationWorkspaceImpl] (default task-14) Added user keverdeen with editorClientId 6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7:0 to workspace ast:coffee/coffee-master
      2015-08-14T00:44:01,377Z INFO [org.zanata.security.ZanataIdentity] (default task-14) Checking for permissions
      2015-08-14T00:44:01,379Z INFO [org.zanata.security.ZanataIdentity] (default task-14) ALLOWED hasPermission([HProject(super=SlugEntityBase(super=HProject@36814adf[id=10733,versionNum=8], slug=coffee), name=coffee), HLocale(localeId=ast)], modify-translation) for user keverdeen
      2015-08-14T00:44:01,379Z INFO [org.zanata.security.ZanataIdentity] (default task-14) EXIT hasPermission(): true

      2015-08-14T00:44:01,379Z INFO [org.zanata.security.ZanataIdentity] (default task-14) Checking for permissions
      2015-08-14T00:44:01,379Z INFO [org.zanata.security.ZanataIdentity] (default task-14) DENIED hasPermission(glossary-update, ) for user keverdeen
      2015-08-14T00:44:01,380Z INFO [org.zanata.security.ZanataIdentity] (default task-14) EXIT hasPermission(): false

      2015-08-14T00:44:01,410Z INFO [org.zanata.security.ZanataIdentity] (default task-14) Checking for permissions
      2015-08-14T00:44:01,410Z INFO [org.zanata.security.ZanataIdentity] (default task-14) ALLOWED hasPermission([HProject(super=SlugEntityBase(super=HProject@36814adf[id=10733,versionNum=8], slug=coffee), name=coffee), HLocale(localeId=ast)], translation-review) for user keverdeen
      2015-08-14T00:44:01,410Z INFO [org.zanata.security.ZanataIdentity] (default task-14) EXIT hasPermission(): true

      2015-08-14T00:44:01,412Z INFO [org.zanata.webtrans.shared.model.WorkspaceRestrictions] (default task-14) Has update access is false

      2015-08-14T00:44:01,476Z INFO [org.infinispan.factories.GlobalComponentRegistry] (default task-14) ISPN000128: Infinispan version: Infinispan 'Insanely Bad Elf' 7.2.3.Final
      2015-08-14T00:44:01,784Z INFO [org.jboss.as.clustering.infinispan] (default task-14) WFLYCLINF0002: Started org.zanata.service.impl.TranslationStateCacheImpl.documentStatisticCache cache from zanata container
      2015-08-14T00:44:01,794Z INFO [org.jboss.as.clustering.infinispan] (default task-14) WFLYCLINF0002: Started org.zanata.service.impl.TranslationStateCacheImpl.docStatusCache cache from zanata container
      2015-08-14T00:44:01,802Z INFO [org.jboss.as.clustering.infinispan] (default task-14) WFLYCLINF0002: Started org.zanata.service.impl.TranslationStateCacheImpl.targetValidationCache cache from zanata container
      2015-08-14T00:44:02,771Z INFO [de.novanic.eventservice.service.EventServiceImpl] (default task-15) Server: Client "6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7-0" initialized.
      2015-08-14T00:44:02,882Z INFO [org.zanata.webtrans.server.TranslationWorkspaceImpl] (default task-18) EditorClientId 6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7:0 has connectionId 6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7-0
      2015-08-14T00:44:03,464Z INFO [org.zanata.rest.service.VirusScanner] (default task-21) defaulting to clamdscan (system property 'virusScanner' is null or empty)
      2015-08-14T00:44:03,464Z WARN [org.zanata.rest.service.VirusScanner] (default task-21) failure to run scanner will be logged but otherwise ignored
      2015-08-14T00:44:03,473Z INFO [org.zanata.rest.service.VirusScanner] (default task-21) scanning with command 'clamdscan', using arguments: [--no-summary, --stream]
      2015-08-14T00:44:03,895Z INFO [org.zanata.webtrans.server.rpc.GetTransUnitListHandler] (default task-24) action: GetTransUnitList{offset=0, count=25, documentId=151883, filterStates=ContentStateGroup(hasNew=true, hasFuzzy=true, hasTranslated=true, hasApproved=true, hasRejected=true), filterHasError=false, targetTransUnitId=18977297, needReloadIndex=true, editorFilter=EditorFilter{textInContent=null, resId=null, lastModifiedBefore=null, lastModifiedAfter=null, lastModifiedByUser=null, sourceComment=null, transComment=null, msgContext=null}}
      2015-08-14T00:44:05,232Z INFO [org.zanata.service.impl.TranslationMemoryServiceImpl] (default task-26) Executing Lucene query: (((textFlow.content-nocase0:it's textFlow.content-nocase0:vampire textFlow.content-nocase0:fighting textFlow.content-nocase0:time)) +locale:ast -state:New -state:NeedReview -state:Rejected) ((tuv.en-US:it's tuv.en-US:vampire tuv.en-US:fighting tuv.en-US:time) +tuv.ast:*)
      2015-08-14T00:51:58,632Z INFO [org.zanata.webtrans.server.TranslationWorkspaceImpl] (GWTEventService-UserActivityScheduler) Timeout for GWTEventService connectionId 6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7-0; removing EditorClientId 6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7:0 from workspace ast:coffee/coffee-master
      2015-08-14T00:51:58,689Z INFO [org.zanata.webtrans.server.TranslationWorkspaceImpl] (GWTEventService-UserActivityScheduler) Removed user keverdeen with editorClientId 6hXgjkmFr5CpGHN5sovCtoviLmhD76_oeTW5gSO7:0 from workspace ast:coffee/coffee-master

        Attachments

          Activity

            People

            • Assignee:
              aeng Alex Eng
              Reporter:
              djansen Damian Jansen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: