public CacheKey(String partialUrl, String appId, List<String> columns, boolean showCount, boolean forceAnonymous, boolean forFlexigrid) { this.appId = appId; this.partialUrl = partialUrl; this.columns = columns; this.showCount = showCount; this.userName = !forceAnonymous ? AuthenticatedUserThreadLocal.getUsername() : null; this.forFlexigrid = forFlexigrid; }
private static String getUsername() { return AuthenticatedUserThreadLocal.getUsername(); }
private DownloadResourceWriter getDownloadResourceWriter(String imageName, String imageFormat) { return writableDownloadResourceManager.getResourceWriter( defaultString(AuthenticatedUserThreadLocal.getUsername()), imageName, imageFormat); }
private void doAnalytic(String participants) { String username = AuthenticatedUserThreadLocal.getUsername(); if (username != null && !username.equals(participants)) { helper.publishAnalyticEvent(SoftwareBPAnalyticEventUtils.RETROSPECTIVE_UPDATE_PARTICIPANTS_EVENT_NAME); } helper.publishAnalyticEvent(SoftwareBPAnalyticEventUtils.RETROSPECTIVE_CREATE_EVENT_NAME); } }
@Override protected BlueprintContext updateBlueprintContext(BlueprintContext context) { String username = AuthenticatedUserThreadLocal.getUsername(); StringBuilder userMention = new StringBuilder(); Map<String, Object> contextMap = new HashMap<String, Object>(); if (username != null) { contextMap.put(USERNAME_KEY, username); } templateRenderer.renderTo(userMention, TEMPLATE_PROVIDER_PLUGIN_KEY, MENTION_TEMPLATE_NAME, contextMap); context.put(DOCUMENT_OWNER, userMention.toString()); //analytic for create requirement helper.publishAnalyticEvent(SoftwareBPAnalyticEventUtils.REQUIREMENT_CREATE_EVENT_NAME); return context; } }
if (StringUtils.isNotBlank(user) && !user.equals(AuthenticatedUserThreadLocal.getUsername()))
String userName = AuthenticatedUserThreadLocal.getUsername(); String strippedUri = stripQueryString(decodedUri);
String currentUsername = AuthenticatedUserThreadLocal.getUsername();
@Override protected BlueprintContext updateBlueprintContext(BlueprintContext context) { final String pageTitle = i18nBean().getText("meeting.notes.blueprint.page.title", asList(helper.getFormattedLocalDate("yyyy-MM-dd"))); String username = AuthenticatedUserThreadLocal.getUsername(); StringBuilder userMention = new StringBuilder(); Map<String, Object> soyContext = new HashMap<String, Object>(); if (username != null) { soyContext.put(USERNAME_KEY, username); } templateRenderer.renderTo(userMention, TEMPLATE_PROVIDER_PLUGIN_KEY, TEMPLATE_NAME, soyContext); context.put("documentOwner", userMention.toString()); context.put("currentDate", helper.getFormattedLocalDate(null)); //for old edited blueprint templates context.put("currentDateLozenge", helper.createStorageFormatForToday()); context.setTitle(pageTitle); return context; }
String user = AuthenticatedUserThreadLocal.getUsername();
StringUtils.defaultString(AuthenticatedUserThreadLocal.getUsername()), "chart", '.' + imageFormat );
throw new NotAuthorizedException( i18NBean.getText("confluence.macros.advanced.include.error.user.not.authorized", new String[]{AuthenticatedUserThreadLocal.getUsername()})); throw new NotAuthorizedException(i18NBean.getText( "confluence.macros.advanced.include.error.user.not.authorized", new String[]{AuthenticatedUserThreadLocal.getUsername()} ));