Snippets

Adaptavist List all Inactive Stash Users

Created by Mark McCormack

File ListInactiveStashUsers Added

  • Ignore whitespace
  • Hide word diff
+import com.atlassian.sal.api.component.ComponentLocator
+import com.atlassian.stash.user.UserService
+import com.atlassian.stash.util.PageRequestImpl
+
+def userService = ComponentLocator.getComponent(UserService)
+
+userService.findUsers(new PageRequestImpl(0, 9999)).values.findAll{
+    user -> !user.isActive()
+}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.