SUASecLab / workadventure-admin

FOSS reimplementation of the WorkAdventure admin services.
11 stars 2 forks source link

How to properly specify start room URL #5

Open zobadaniel opened 7 months ago

zobadaniel commented 7 months ago

Hi,

I have a public map which is configured like this:

START_ROOMURL=//global/zalozbadev.github.io/workadventure-map-test-office/map.tmj

But I fail to properly set it up in the "Room Management" site.

"WAM Link URL" is fixed, cannot change it. The map does not have a WAM file on github.

I'm trying to put the link to "zalozbadev.github.io/workadventure-map-test-office/map.tmj" into the "JSON File URL" field.

I can store these settings, but I still get the error "The map file for the start room has not been set so far!"

I tried with a WAM file that was created by uploading to the map storage container of workadventure:

START_ROOM_URL=/~/workadventure-map-test-office.wam

But this failed even more.

I have no idea how to properly configure my start map. Please help.

ttefke commented 7 months ago

Hello, please excuse my late reply. You have to specify a WAM file you uploaded to the map storage. Furthermore you have to set up the map in the admin interface (specify WAM URL, map URL (link to JSON file, an access policy and tags if necessary). This also means you have to set up corresponding collections in the mongoDB instance (see initialization script in the containers/mongo directory).

If you need further information, please do not hesitate to ask. Best regards, Tobias

zobadaniel commented 7 months ago

Hi,

meanwhile I got something working.

This logic https://github.com/SUASecLab/workadventure-admin/blob/6692c351b82f18614647f7685a5e7af734cdf24c/src/snippets/rooms.php#L206 did not work for me, so I could never specify my start room correctly. So I removed the "readonly" attribute from here https://github.com/SUASecLab/workadventure-admin/blob/6692c351b82f18614647f7685a5e7af734cdf24c/src/snippets/rooms.php#L211 and then I could specify my WAM link correctly. It looks like this now:

/~/map.wam | zalozbadev.github.io/workadventure-map-test-office/map.tmj

I don't want to live with modified resources forever, maybe you can tell me what I did wrong?

I'll create a separate issue for user administration. I could not get the restrictions to work, maybe I need to try again.

ttefke commented 7 months ago

Hi, the configuration the admin requires bases on the assumption that you use the same .env file for the configuration of the admin containers you already use for WorkAdventure. The START_ROOM_URL points to the URL of the first map. If no map file pointing to this URL is set, the room URL is set to readonly to make sure the admin does not forget to set a valid map file for the start room map url.

For the other issue you pointed out, please open a new issue. If there should be a bug in the software, I'd be happy if I know more about it to develop a patch.

Best regards, Tobias