просто используйте reverse()
в массиве, предположим, что если вы сохраняете значения в массиве items[]
, тогда выполните this.items.reverse()
ref.subscribe(snapshots => {
this.loading.dismiss();
this.items = [];
snapshots.forEach(snapshot => {
this.items.push(snapshot);
});
**this.items.reverse();**
},
У вас есть как минимум три проблемы:
<subsystem xmlns="urn:jboss:domain:security:2.0">
- это устаревший элемент конфигурации, который не связан с elytron;
Ваш метод EJB не защищен с помощью @RolesAllowed(...)
.
Я получил похожий пример работы:
Создайте элитронную область свойств:
/subsystem=elytron/properties-realm=DemoPropsRealm:add(groups-attribute=groups,\
groups-properties={\
path=demo-roles.properties,relative-to=jboss.server.config.dir},\
users-properties={\
path=demo-users.properties,relative-to=jboss.server.config.dir,plain-text=true})
/subsystem=elytron/security-domain=DemoDomain:add(\
realms=[{realm=DemoPropsRealm,role-decoder=groups-to-roles}],\
default-realm=DemoPropsRealm,permission-mapper=default-permission-mapper)
Создайте фабрику http-аутентификации elytron , которая сопоставлена с нашим DemoDomain: [ 1134]
/subsystem=elytron/http-authentication-factory=demo-http-auth:add(\
http-server-mechanism-factory=global,\
security-domain=DemoDomain,\
mechanism-configurations=[{\
mechanism-name=BASIC,\
mechanism-realm-configurations=[{\
realm-name=DemoApplicationDomain\
}]\
}])
Сопоставить домен безопасности приложения ejb3 с нашим DemoDomain
/subsystem=ejb3/application-security-domain=\
DemoApplicationDomain:add(security-domain=DemoDomain)
Ссылка undertow домен безопасности приложения подсистемы для нашей фабрики http-authentication:
/subsystem=undertow/application-security-domain=\
DemoApplicationDomain:add(http-authentication-factory=demo-http-auth)
«DemoApplicationDomain» будет именем области в элементе login-config
файла web.xml и security-domain
в файл jboss-web.xml.
Объявите разрешенные роли в вашем методе EJB:
@RolesAllowed("Admin")
public void printText(String text) {
System.out.println(text + ":: EJBContext: " + context.getCallerPrincipal().getName()
+ " SessionContext: " + ctx.getCallerPrincipal().getName());
}
Пример источника находится в GitHub по адресу jax-rs-basic-auth . [+1139]