- /**
- * Simply retrieves username for current user, generally a LDAP dn
- *
- * @deprecated Use {@link CurrentUser#getUsername()}
- */
- @Deprecated
- public static String getCurrentUsername() {
- return CurrentUser.getUsername();
- }
-
- // /**
- // * Fork of the {@link CurrentUser#currentSubject} method that is private.
- // * TODO Enhance and factorize
- // */
- // private static Subject currentSubject() {
- // CmsView cmsView = CmsUtils.getCmsView();
- // if (cmsView != null)
- // return cmsView.getSubject();
- // Subject subject = Subject.getSubject(AccessController.getContext());
- // if (subject != null)
- // return subject;
- // throw new RuntimeException("Cannot find related subject");
- // }
-