mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-22 12:34:25 +00:00
add room namespaces whitelist
This commit is contained in:
parent
fafda8954f
commit
dc4e9d61c2
12
.env
12
.env
@ -31,16 +31,16 @@ APP_KEVACOIN_PORT=9992
|
||||
APP_KEVACOIN_USERNAME=EDIT_ME
|
||||
APP_KEVACOIN_PASSWORD=EDIT_ME
|
||||
|
||||
# Default room namespace (must be owned to accept posts)
|
||||
APP_KEVACOIN_NAMESPACE=EDIT_ME
|
||||
|
||||
# Address to receive kevacoin powers (make others able to fill node balance)
|
||||
APP_KEVACOIN_ADDRESS=EDIT_ME
|
||||
|
||||
# Share with other some mining pool to get coins
|
||||
APP_KEVACOIN_MINE_POOL_URL=https://miningpoolstats.stream/kevacoin
|
||||
APP_KEVACOIN_MINE_SOLO_URL=https://kevacoin.org/tutorial_solo_mining.html
|
||||
|
||||
# Address to receive kevacoin powers (make others able to fill node balance)
|
||||
APP_KEVACOIN_MINE_ADDRESS=EDIT_ME
|
||||
|
||||
# Allowed room namespaces, separated with | (must be owned to accept posts)
|
||||
APP_KEVACOIN_ROOM_NAMESPACES=EDIT_ME
|
||||
|
||||
# Allow remotes to create new rooms (namespaces)
|
||||
APP_ADD_ROOM_REMOTE_IP_REGEX=/.*/
|
||||
|
||||
|
@ -12,8 +12,8 @@ parameters:
|
||||
app.kevacoin.port: '%env(APP_KEVACOIN_PORT)%'
|
||||
app.kevacoin.username: '%env(APP_KEVACOIN_USERNAME)%'
|
||||
app.kevacoin.password: '%env(APP_KEVACOIN_PASSWORD)%'
|
||||
app.kevacoin.namespace: '%env(APP_KEVACOIN_NAMESPACE)%'
|
||||
app.kevacoin.address: '%env(APP_KEVACOIN_ADDRESS)%'
|
||||
app.kevacoin.room.namespaces: '%env(APP_KEVACOIN_ROOM_NAMESPACES)%'
|
||||
app.kevacoin.mine.address: '%env(APP_KEVACOIN_MINE_ADDRESS)%'
|
||||
app.kevacoin.mine.pool.url: '%env(APP_KEVACOIN_MINE_POOL_URL)%'
|
||||
app.kevacoin.mine.solo.url: '%env(APP_KEVACOIN_MINE_SOLO_URL)%'
|
||||
|
||||
|
@ -26,11 +26,11 @@ class ModuleController extends AbstractController
|
||||
'wallet' =>
|
||||
[
|
||||
'balance' => (float) $client->getBalance(),
|
||||
'block' => (int) $client->getBlockCount(),
|
||||
'address' => $this->getParameter('app.kevacoin.address')
|
||||
'block' => (int) $client->getBlockCount()
|
||||
],
|
||||
'mine' =>
|
||||
[
|
||||
'address' => $this->getParameter('app.kevacoin.mine.address'),
|
||||
'pool' =>
|
||||
[
|
||||
'url' => $this->getParameter('app.kevacoin.mine.pool.url')
|
||||
|
@ -23,7 +23,7 @@ class RoomController extends AbstractController
|
||||
return $this->redirectToRoute(
|
||||
'room_namespace',
|
||||
[
|
||||
'namespace' => $this->getParameter('app.kevacoin.namespace')
|
||||
'namespace' => explode('|', $this->getParameter('app.kevacoin.room.namespaces'))[0]
|
||||
]
|
||||
);
|
||||
}
|
||||
@ -149,7 +149,7 @@ class RoomController extends AbstractController
|
||||
return $this->redirectToRoute(
|
||||
'room_namespace',
|
||||
[
|
||||
'namespace' => $this->getParameter('app.kevacoin.namespace')
|
||||
'namespace' => explode('|', $this->getParameter('app.kevacoin.room.namespaces'))[0]
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
{{ 'block:' | trans }} {{ wallet.block }}
|
||||
/
|
||||
{{ 'balance:' | trans }} {{ wallet.balance }}
|
||||
{% if wallet.address %}
|
||||
{% if mine.address %}
|
||||
/
|
||||
{{ 'charge:' | trans }}
|
||||
<pre>{{ wallet.address }}</pre>
|
||||
<pre>{{ mine.address }}</pre>
|
||||
{% endif %}
|
||||
{% if mine.pool %}
|
||||
/
|
||||
|
Loading…
x
Reference in New Issue
Block a user