Pages.create(Spaces.getByKey("SR"), "New Page Title") {
setLabels("new-label")
setParentPage("Title of a page in the same space")
}
Users.getInactiveUsers(Duration.of(90, ChronoUnit.DAYS)).each { user ->
user.deactivate()
}
Users.getByKey('ff8080818b0052d3018b006f216d0000')
Users.getByName('username')
Users.getInactiveUsers(Duration.of(90, ChronoUnit.DAYS))
Users.getLoggedInUser()
Pages.search('space = DS').each { page ->
page.replaceLabel {
from = "oldLabel"
to = "newLabel"
}
}
def pages = Users.runAnonymously {
Pages.search('space = ds')
}
def pages = Users.runAs(Users.getByName('username')) {
Pages.search('space = ds')
}