<User> cannot be deleted; they belong to a read-only directory.
症状
When trying to delete a particular user from Stash's Administration section, the following error is reported on screen:
User <Username> cannot be deleted; they belong to a read-only directory. Consult the logs for more details.
And following warning is reported in <STASH_HOME>/log/atlassian-stash.log file:
2015-05-08 09:26:08,804 WARN [http-nio-7990-exec-3] stashadmin @6TROM6x566x112x0 1toy15b 0:0:0:0:0:0:0:1 "DELETE /admin/users HTTP/1.1" c.a.stash.internal.crowd.RiotPolice User jiraadmin could not be deleted
com.atlassian.crowd.exception.OperationNotPermittedException: com.atlassian.crowd.exception.ApplicationPermissionException: Not allowed to delete user 'Username' from directory 'Directory'.
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.removeUser(CrowdServiceImpl.java:505) ~[embedded-crowd-core-2.8.1-m3.jar:na]
at com.atlassian.stash.internal.crowd.RiotPolice$5.execute(RiotPolice.java:196) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.crowd.RiotPolice$5.execute(RiotPolice.java:191) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.crowd.RiotPolice.execute(RiotPolice.java:680) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.crowd.RiotPolice.deleteUser(RiotPolice.java:191) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.user.DefaultUserAdminService.deleteUser(DefaultUserAdminService.java:288) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.user.DefaultUserAdminService.deleteUser(DefaultUserAdminService.java:56) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.rest.user.UserAdminResource.deleteUser(UserAdminResource.java:214) [stash-rest-3.6.1.jar:na]
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) [applinks-plugin-4.3.5_1418154064000.jar:na]
at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) [StashAuthenticationFilter.class:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) [BeforeLoginPluginAuthenticationFilter.class:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) [BeforeLoginPluginAuthenticationFilter.class:na]
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) [atlassian-trusted-apps-core-3.0.8.jar:na]
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79) [atlassian-oauth-service-provider-plugin-1.9.9_1418154064000.jar:na]
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) [atlassian-trusted-apps-core-3.0.8.jar:na]
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79) [atlassian-oauth-service-provider-plugin-1.9.9_1418154064000.jar:na]
at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:32) [analytics-client-3.53_1418154066000.jar:na]
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) [analytics-client-3.53_1418154066000.jar:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) [BeforeLoginPluginAuthenticationFilter.class:na]
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na]
at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:85) [stash-service-impl-3.6.1.jar:na]
at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) [ConfigurableWebFilter.class:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]
... 290 frames trimmed
Caused by: com.atlassian.crowd.exception.ApplicationPermissionException: Not allowed to delete user 'Username' from directory 'Directory'.
at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.removeUser(ApplicationServiceGeneric.java:825) ~[crowd-core-2.8.1-m3.jar:na]
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.removeUser(CrowdServiceImpl.java:496) ~[embedded-crowd-core-2.8.1-m3.jar:na]
... 24 common frames omitted
原因
JIRA user management in Stash is "read-only". All user management related tasks can only be done in JIRA not Stash as documented here.
ソリューション
Log into your JIRA server as an administrator and delete the user from there.
最終更新日 2018 年 11 月 2 日
Powered by Confluence and Scroll Viewport.