1414import jakarta .annotation .PostConstruct ;
1515
1616import org .eclipse .scout .contacts .server .sql .DatabaseProperties .SuperUserSubjectProperty ;
17+ import org .eclipse .scout .rt .platform .ApplicationScoped ;
1718import org .eclipse .scout .rt .platform .BEANS ;
1819import org .eclipse .scout .rt .platform .IPlatform .State ;
1920import org .eclipse .scout .rt .platform .IPlatformListener ;
2425import org .eclipse .scout .rt .platform .exception .PlatformException ;
2526import org .eclipse .scout .rt .platform .util .FinalValue ;
2627import org .eclipse .scout .rt .server .context .ServerRunContext ;
27- import org .eclipse .scout .rt .server .context .ServerRunContextProducer ;
2828import org .eclipse .scout .rt .server .session .IServerSession ;
2929import org .eclipse .scout .rt .server .session .ServerSessionProvider ;
3030import org .eclipse .scout .rt .server .session .context .ServerSessionRunContext ;
3131import org .eclipse .scout .rt .server .session .context .ServerSessionRunContexts ;
3232import org .eclipse .scout .rt .shared .ui .UserAgents ;
3333
3434/**
35- * Central point to obtain run contexts with super user rights, and to get the super user subject and session.
35+ * Central point to obtain run contexts with super- user rights, and to get the super- user subject and session.
3636 * <p>
37- * A super user run context is a {@link ServerRunContext} with a user that has administrator privileges.
37+ * A super- user run context is a {@link ServerRunContext} with a user that has administrator privileges.
3838 */
39- public class SuperUserRunContextProducer extends ServerRunContextProducer {
39+ @ ApplicationScoped
40+ public class SuperUserRunContextProducer {
4041
4142 private final FinalValue <IServerSession > session = new FinalValue <>();
4243 private final FinalValue <Subject > subject = new FinalValue <>();
@@ -46,20 +47,6 @@ protected void initSuperUserSubject() {
4647 subject .set (CONFIG .getPropertyValue (SuperUserSubjectProperty .class ));
4748 }
4849
49- /**
50- * Produces a new {@link ServerRunContext} with super user rights.
51- * <p>
52- * This method delegates to {@link #produce()}, meaning that the subject specified is ignored.
53- *
54- * @param subject
55- * is ignored, and {@link SuperUserRunContextProducer#getSubject()} used instead.
56- * @see #produce()
57- */
58- @ Override
59- public final ServerRunContext produce (final Subject inputSubject ) {
60- return produce ();
61- }
62-
6350 /**
6451 * Produces a new {@link ServerRunContext} with super user rights.
6552 * <p>
0 commit comments