Giter Site home page Giter Site logo

nextcloud / guests Goto Github PK

View Code? Open in Web Editor NEW
45.0 8.0 27.0 8.75 MB

๐Ÿ™ˆ Create guest users which can only see files shared with them

Home Page: https://apps.nextcloud.com/apps/guests

License: GNU Affero General Public License v3.0

PHP 38.25% JavaScript 55.02% Gherkin 0.37% Shell 0.36% Makefile 0.34% Vue 5.66%
nextcloud open-source nextcloud-app email-invitation guest-user guest

guests's Introduction

๐Ÿ‘ฅ Guests

The Nextcloud Guests app allows you to create users which can only see files shared with them and access a customizable set of apps.

image

Guests accounts can be created from the share menu by entering either the recipients email or name and choosing Invite guest. Once the share is created the guest user will receive an email notification about the mail with a link to set their password.

Guests users can only access files shared to them and cannot create any files outside of shares. Additionally, the apps accessible to guest accounts are whitelisted.

Installation

The app is published in the app store. It can be installed through Nextcloud's app management UI.

Development

Development is ongoing. A CHANGELOG covers the highlights. New releases are also published on GitHub.

Usage

Guests are be created via the Web UI or occ guests commands. The admin can also customize system-wide guest related behavior by going to Administration settings->Guests in the Web UI.

Creating a guest

  1. Create a guest user by typing their email address into the sharing dialog
  2. Select Invite guest in the menu that appears.

The guest will receive an email invitation with a link to create an account. They only have access to files which are shared with them.

Optionally, when creating a guest the following values may also be specified:

  • Set a display name for the guest user.
  • Set a language for the invitation email (otherwise the server's default language will be used).

Admins/Group admins also may:

image

Warning

While it is easy to create a new Guest, it's important to understand the default behavior and how guests interact with other features in Nextcloud. See Guest specific behavior and configuration for details.

Deleting a guest

Guests may be deleted in the same way you would remove (or disable) regular user accounts. Guests are in the group Guests.

occ commands

The command occ guests:add can be used to create guest users on the command-line.

php occ guests:add [--generate-password] [--password-from-env] [--display-name [DISPLAY-NAME]] [--language [LANGUAGE]] [--] <created-by> <email>

For example:

OC_PASS=somepassword php occ guests:add --password-from-env --display-name "Max Mustermann" --language "de_DE" admin [email protected]

The user will then be able to login with "[email protected]" using the given password.

When using --generate-password instead of giving a password, a random password will be generated. The guest user should then use the "forgot password" link to reset it.

Note

The occ command will only create the guest account (i.e. it will not send out the invite email).

List existing guest users

The following command will list existing guest users:

% php occ guests:list
+---------------------------+----------------+------------+---+
| Email                     | Name           | Invited By |   |
+---------------------------+----------------+------------+---+
| [email protected] | Max Mustermann | admin      | 0 |
+---------------------------+----------------+------------+---+

Guest Specific Behavior and Configuration

Guest users interact with sharing and security functionality in unique ways. Many of the default behaviors related to Guests can also be customized.

Tip

It's important to understand how the Guests app interacts with other aspects of Nextcloud even if you choose to utilize the default settings.

Inviting guests (sharing)

It is possible to restrict users to only share within the groups they are members of themselves (Settings > Administration > Sharing > Restrict users to only share with users in their groups)

If that setting is turned on, guests can only be invited by group admins.

Upon invitation, the group admin must select at least one of their adminstrated groups the guest shall be member of.

Share acceptance

Guest users automatically accept all files and folders that are shared with them. This is in constract to regular full users (who have to actively accept incoming shares since Nextcloud 18).

Restricting app access

Administrators can set a whitelist of apps that guest users have access to.

By default the following are allowed:

  • files_trashbin
  • files_versions
  • files_sharing
  • files_texteditor
  • text
  • activity
  • firstrunwizard
  • photos
  • notifications
  • dashboard
  • user_status
  • weather_status

In addition, the following apps are always whitelisted to ensure minimal functionality:

  • core
  • theming
  • settings
  • avatar
  • files
  • heartbeat
  • dav
  • guests
  • impersonate
  • accessibility
  • terms_of_service
  • dashboard
  • weather_status
  • user_status
  • apporder

Hide other users

By default, guests will not be able to list other users in the system, but if a guest gets added to a group they will be able to list users within that group (and, for example, share files with those users).

As a result, guests will be able to see each other as they are part of the same guest group. To prevent that behavior, you can add the guest group to the "Exclude groups from sharing" settings. You can find more information in our documentation about sharing.

Converting guest users to full users

Guest users can be automatically converted into full users (provided by any other user back end like SAML, LDAP, OAuth, database...) on their next login. When this happens they will retain their shares.

For this to happen the following must be true:

  • The target (new) account needs to have the same email address as the guest account.
  • The config.php setting 'migrate_guest_user_data' => true, must be added.

By default the old (guest) account will be disabled after successful conversion. The config.php setting 'remove_guest_account_on_conversion' => true can be set if you want the old account to be deleted rather than disabled.

Help & Contributing

guests's People

Contributors

artonge avatar blizzz avatar butonic avatar carlschwan avatar christophwurst avatar come-nc avatar deepdiver1975 avatar dependabot-preview[bot] avatar dependabot[bot] avatar felixheidecke avatar fenn-cs avatar icewind1991 avatar iljan avatar jancborchardt avatar joshtrichards avatar juliushaertl avatar lukasreschke avatar mhoffrog avatar morrisjobke avatar nextcloud-bot avatar nickvergessen avatar pvince81 avatar rakekniven avatar rullzer avatar sergiobertolinsg avatar skjnldsv avatar tortuetorche avatar valdnet avatar weeman1337 avatar wiswedel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guests's Issues

Guest users can't use 2FA

If I try to enable 2FA (U2F) for a guest user I get a 500, the response body contains following message:

This application requires JavaScript for correct operation. Please enable JavaScript and reload the page.
Nextcloud
Error

    Access to this resource is forbidden for guests.

Nextcloud โ€“ a safe home for all your data

Also generating backup codes throws the same error.

CSRF check failed while activating guest accounts

I just tried the guest app 1.1.0 from the app store with the git master version of Nextcloud.

Steps to reproduce:

  1. create a guest account by sharing a file with an new guest user
  2. open the invitation mail for the guest user
  3. click on "activate account" in the mail
  4. Browser opens and ask the user to set a password for the guest account
  5. Enter the password and continue
  6. Error message "CSRF check failed"

image

Create OCS api endpoint

Currently I am looking into extending the Outlook plugin with the option to create guest accounts.

Would it be possible to create an OCS-endpoint controller to create, get and list users?

Thanks!

First sharing to a Guest does not work / Guest app does not work

Steps to reproduce

  1. install the guest app from the appstore
  2. Try to share to a new user and enter a name of a not already existing user

Expected behaviour

  1. I should then see the "create guest account"-popup

Actual behaviour

  1. A text-bubble appears with the text "no users and groups found with that name" and the loading-wheel spins until the end of time. (also nothing happens, if I click on the spinning wheel or click enter on the keyboard. (klicking enter just results in greying out the field)

Server configuration detail

Operating system: Linux 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 UTC 2019 x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 5.7.27

PHP version:

7.2.20
Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, pcntl, PDO, session, pdo_sqlite, posix, Reflection, standard, SimpleXML, mysqlnd, exif, tokenizer, xml, xmlreader, xmlwriter, zip, pdo_mysql, cgi-fcgi, redis, Zend OPcache

Nextcloud version: 16.0.3 - 16.0.3.0

Updated from an older Nextcloud/ownCloud or fresh install: updated over the time starting at 15.0.8

Where did you install Nextcloud from: snap-store

Signing status

Array
(
)

List of activated apps
Enabled:
 - activity: 2.9.1
 - admin_audit: 1.6.0
 - announcementcenter: 3.5.1
 - apporder: 0.7.1
 - bookmarks: 1.1.1
 - calendar: 1.7.0
 - circles: 0.17.7
 - cloud_federation_api: 0.2.0
 - contacts: 3.1.3
 - cospend: 0.1.0
 - dav: 1.9.2
 - deck: 0.6.6
 - drawio: 0.9.3
 - event_update_notification: 0.3.4
 - external: 3.3.0
 - extract: 1.2.0
 - federatedfilesharing: 1.6.0
 - files: 1.11.0
 - files_3d: 0.1.0
 - files_downloadactivity: 1.5.0
 - files_ebookreader: 0.0.1
 - files_external: 1.7.0
 - files_linkeditor: 1.0.10
 - files_mindmap: 0.0.15
 - files_pdfviewer: 1.5.0
 - files_rightclick: 0.15.1
 - files_sharing: 1.8.0
 - files_trashbin: 1.6.0
 - files_versions: 1.9.0
 - files_videoplayer: 1.5.0
 - firstrunwizard: 2.5.0
 - forms: 1.0.3
 - gallery: 18.3.0
 - guests: 1.1.1
 - impersonate: 1.3.0
 - issuetemplate: 0.5.0
 - keeweb: 0.5.1
 - logreader: 2.1.0
 - lookup_server_connector: 1.4.0
 - metadata: 0.9.0
 - music: 0.10.0
 - nextcloud_announcements: 1.5.0
 - notes: 3.0.1
 - notifications: 2.4.1
 - oauth2: 1.4.2
 - password_policy: 1.6.0
 - passwords: 2019.8.1
 - polls: 0.10.2
 - previewgenerator: 2.1.0
 - privacy: 1.0.0
 - provisioning_api: 1.6.0
 - quickaccesssorting: 1.0.1
 - radio: 0.6.5
 - rainloop: 6.0.3
 - ransomware_detection: 0.5.2
 - ransomware_protection: 1.4.0
 - recommendations: 0.4.0
 - serverinfo: 1.6.0
 - spreed: 6.0.4
 - suspicious_login: 1.0.0
 - tasks: 0.11.1
 - telephoneprovider: 1.0.2
 - text: 1.0.2
 - theming: 1.7.0
 - twofactor_admin: 0.4.0
 - twofactor_backupcodes: 1.5.0
 - twofactor_nextcloud_notification: 1.1.2
 - twofactor_totp: 3.0.1
 - video_converter: 0.1.0
 - viewer: 1.0.0
 - workflowengine: 1.6.0
Disabled:
 - accessibility
 - comments
 - encryption
 - federation
 - files_texteditor
 - sharebymail
 - sharerenamer
 - support
 - survey_client
 - systemtags
 - user_ldap

Configuration (config/config.php)
{
    "apps_paths": [
        {
            "path": "\/snap\/nextcloud\/current\/htdocs\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/snap\/nextcloud\/current\/nextcloud\/extra-apps",
            "url": "\/extra-apps",
            "writable": true
        }
    ],
    "supportedDatabases": [
        "mysql"
    ],
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0
    },
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "16.0.3.0",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "maintenance": false,
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "ssl",
    "mail_sendmailmode": "smtp",
    "mail_smtpport": "465",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "trashbin_retention_obligation": "disabled",
    "loglevel": 2,
    "share_folder": "\/Shared",
    "preview_max_x": 1536,
    "preview_max_y": 1536,
    "preview_max_scale_factor": 1,
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\HEIC",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\TIFF",
        "OC\\Preview\\Illustrator",
        "OC\\Preview\\Movie",
        "OC\\Preview\\Photoshop",
        "OC\\Preview\\SVG"
    ],
    "app_install_overwrite": [
        "occweb"
    ],
    "theme": ""
}

Are you using external storage, if yes which one: local-cifs mount

Are you using encryption:

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Operating system: Windows 10

Logs

Web server error log
Insert your web server log here 
Nextcloud log
Insert your Nextcloud log here
Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Convert guest into regular user

As admin, I'd like to be able to convert someone who's initially been invited as guest into a regular user.
Currently being a guest is a dead end at some time.

related: #83

NC15 - Configuration screen blank and group 'guests' ghosted

After downloading the app, copying it to the app-dir and enabling it, there is a menu item in the settings menu in NC15 (even 15.0.2). Unfortunatly after selecting it, a blank page is displayed on the right side of the screen instead of a configuarion page. Furthermore the group "Guests" is ghosted in the user-management.

Anybody any idea?
THX beebodo

Allow configuring groups that can create guest accounts and that guests belong to

It would be useful to make guest accounts more controlable:

  • configure what group(s) guest accounts belong to
  • configure users from what group can create them
    • and if the guest account then gets the group of the user who created it

This allows limiting the creation of guest accounts to certain users; and gives more ways of using File Access Control and workflow things to control the guest accounts.

Guest users cannot upload files larger than 10 MB

Steps to reproduce

  1. User A shares Folder B with Guest C
  2. Login as Guest B
  3. Upload File D (5 MB) into Folder B --> success
  4. Upload File E (12 MB) into Folder B --> "Upload cancelled"

image

  1. Login as User A
  2. Upload File E (12 MB) into folder B --> success

Server log:

[webdav] Debug: Sabre\DAV\Exception\Forbidden:  at <<closure>>

0. /var/www/nextcloud/apps/dav/lib/Upload/UploadHome.php line 49
   OCA\DAV\Connector\Sabre\Directory->createDirectory("web-file-upload ... 9")
1. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1210
   OCA\DAV\Upload\UploadHome->createDirectory("web-file-upload ... 9")
2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 590
   Sabre\DAV\Server->createCollection("uploads/guest1@ ... 9", Sabre\DAV\MkCol {})
3. <<closure>>
   Sabre\DAV\CorePlugin->httpMkcol(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpMkcol"], [Sabre\HTTP\Requ ... }])
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   Sabre\Event\EventEmitter->emit("method:MKCOL", [Sabre\HTTP\Requ ... }])
6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /var/www/nextcloud/apps/dav/lib/Server.php line 316
   Sabre\DAV\Server->exec()
8. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
9. /var/www/nextcloud/remote.php line 163
   undefinedundefinedrequire_once("/var/www/nextcl ... p")

MKCOL /remote.php/dav/uploads/guest1%40sascha-wiswedel.de/web-file-upload-d596a5d76f86a4822d8467825658f161-1561649688549
from 192.168.56.1 by [email protected] at 2019-06-27T15:34:48+00:00

Server configuration detail

Operating system: Linux 4.18.0-22-generic #23~18.04.1-Ubuntu SMP Thu Jun 6 08:37:25 UTC 2019 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (apache2handler)

Database: mysql 10.3.15

PHP version: 7.3.6-1+ubuntu18.04.1+deb.sury.org+1

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, ldap, exif, mysqli, pdo_mysql, apc, posix, readline, redis, shmop, SimpleXML, smbclient, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Phar, libsmbclient, Zend OPcache

Nextcloud version: 16.0.1 - 16.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
[files_external] => Array
(
[INVALID_HASH] => Array
(
[lib/config.php] => Array
(
[expected] => a6d5c907f5649a53f9b4bba2717e996989950ce5d172c6851a4876127a7dda01fa21b1ecfac0caa586b59697f546456122bd7924edd4b07863a78fb1fe8e3cc2
[current] => 84a017976db85d5815ed35b23d6203c2c183faf2f5ff9db8e7b6f0e85e5bc15f15c6e3c59292ef15c98714e689ab75e39a29e275cda6284ce2ef08d423a45723
)

            )

    )

)

List of activated apps
Enabled:
 - accessibility: 1.2.0
 - activity: 2.9.1
 - admin_audit: 1.6.0
 - bruteforcesettings: 1.3.0
 - calendar: 1.7.0
 - circles: 0.17.3
 - cloud_federation_api: 0.2.0
 - comments: 1.6.0
 - contacts: 3.1.3
 - dav: 1.9.2
 - deck: 0.6.2
 - drawio: 0.9.3
 - federatedfilesharing: 1.6.0
 - federation: 1.6.0
 - files: 1.11.0
 - files_accesscontrol: 1.6.0
 - files_external: 1.7.0
 - files_fulltextsearch: 1.3.2
 - files_fulltextsearch_tesseract: 1.3.0
 - files_pdfviewer: 1.5.0
 - files_readmemd: 1.0.4
 - files_rightclick: 0.13.0
 - files_sharing: 1.8.0
 - files_texteditor: 2.8.0
 - files_trashbin: 1.6.0
 - files_versions: 1.9.0
 - files_videoplayer: 1.5.0
 - firstrunwizard: 2.5.0
 - fulltextsearch: 1.3.4
 - fulltextsearch_elasticsearch: 1.3.3
 - gallery: 18.3.0
 - groupfolders: 4.0.3
 - guests: 1.1.0
 - impersonate: 1.3.0
 - logreader: 2.1.0
 - lookup_server_connector: 1.4.0
 - nextcloud_announcements: 1.5.0
 - notifications: 2.4.1
 - oauth2: 1.4.2
 - password_policy: 1.6.0
 - polls: 0.10.2
 - privacy: 1.0.0
 - provisioning_api: 1.6.0
 - recommendations: 0.4.0
 - sandblast: 1.0.0
 - serverinfo: 1.6.0
 - sharebymail: 1.6.0
 - spreed: 6.0.1
 - support: 1.0.0
 - survey_client: 1.4.0
 - systemtags: 1.6.0
 - theming: 1.7.0
 - twofactor_backupcodes: 1.5.0
 - updatenotification: 1.6.0
 - user_ldap: 1.6.0
 - user_saml: 2.3.1
 - viewer: 1.0.0
 - workflowengine: 1.6.0
Disabled:
 - encryption
 - files_antivirus
 - passman
 - terms_of_service

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "192.168.56.105"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "16.0.1.1",
    "overwrite.cli.url": "http:\/\/192.168.56.105",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "app_install_overwrite": [
        "terms_of_service",
        "bookmarks_fulltextsearch"
    ],
    "maintenance": false,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "theme": "",
    "loglevel": 0
}

Encryption: no

User-backends:

  • OC\User\Database
  • OCA\Guests\UserBackend

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Guests 1.2.0 - IEventDispatcher does not exist

Did the update to 1.2.0 and now the app doesn't start any more:

`Error no app in context OCP\AppFramework\QueryException: Could not resolve OCA\Guests\GuestManager! Class OCP\EventDispatcher\IEventDispatcher does not exist
/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 119:

OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Guests\GuestManager")

/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 411:

OC\AppFramework\Utility\SimpleContainer->query("OCA\Guests\GuestManager")

/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 382:

OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Guests\GuestManager")

/var/www/nextcloud/apps/guests/lib/AppInfo/Application.php - line 50:

OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Guests\GuestManager")

/var/www/nextcloud/apps/guests/lib/AppInfo/Application.php - line 84:

OCA\Guests\AppInfo\Application->getGuestManager()

/var/www/nextcloud/apps/guests/lib/AppInfo/Application.php - line 38:

OCA\Guests\AppInfo\Application->setupGuestManagement()

/var/www/nextcloud/apps/guests/appinfo/app.php - line 25:

OCA\Guests\AppInfo\Application->setup()

/var/www/nextcloud/lib/private/legacy/app.php - line 262:

require_once("/var/www/ne ... p")

/var/www/nextcloud/lib/private/legacy/app.php - line 155:

OC_App::requireAppFile("guests")

/var/www/nextcloud/lib/private/legacy/app.php - line 128:

OC_App::loadApp("guests")

/var/www/nextcloud/ocs/v1.php - line 54:

OC_App::loadApps([ "authentication"])

/var/www/nextcloud/ocs/v2.php - line 24:

require_once("/var/www/nextcloud/ocs/v1.php")
`

Any hints to solve this issue are welcome!

People menu hidden for all users

I just stumbled over this PR which hides the people menu if the guest app is activated: f09b3af

But there are two problems:

  1. we hide it for all users, not only guests
  2. it only works if the css is loaded which is not always the case, e.g it is not loaded on the settings page.

We can probably fix this in combination with: #89

Cannot whitelist Collabora for guests

I use app whitelisting for guests. Collabora is installed (docker) and the app is installed in Nextcloud.
For any reason I cannot whitelist Collabora for guest. When guests try to open a document, only an error message is shown that Collabora could not be loaded.

When I remove the whitelisting (i.e. guest can use all the installed apps), documents can be opened without problems.

Is this an issue of the guest app or the Collabora app?

Password change is disabled

Probably not your apps problem, but I guess this is the best place to go for help.
When a guest account follows the link to activate the account it gets the error "Password reset is disabled". Already set 'turnOnPasswordChange' and AD users have the password change field, but the guest account dont. What do I have to set for this to work?
Thanks, best regards.

Switch group

After creating a user in group guests and login with this user. The user is switched to group user and no longer in guests.

Nextcloud 16

uri does not change after setting password for guest account activation when prompted for login. Results in 500 error first login attempt

I likely have an issue with my v-host conf or htaccess or somewhere else in my installation that I cannot pinpoint but I only seem to get an http 500 error in the guests app so I am starting my issue here. Please note that I do am not using a /nextcloud subdirectory in my site path to access the installation.

I observed that when I click the activation link for a nextcloud guest account I am prompted to set the password. After setting the password the url redirects to https://domain.tld/index.php/[email protected], which places [email protected] into the user or email field. After entering the password and pressing the login button the site returns an HTTP 500 error. If I refresh the uri redirects to files e.g.) https://domain.tld/index.php/login?redirect_url=/index.php/apps/files/

Any idea what could possibly be the issue?

Don't allow to create guest accounts for already existing users

Avoid that guest accounts for already existing users are created.

  1. The Share dialog should not show the "create guest account" if the user enters an email address which belongs to an already existing account/user

  2. If the user types a display name in the share dialog, the pop-up in the second step should check if the entered email address belongs to an already existing account/user (i think that's already the case, but please double check)

Control who can invite

On many apps, we can limit the use of the app to some(s) group(s).
If we could do this for guests, it would be possible to give some members (in an ad-hoc group) the possibility to invite users, not absolutely anyone, and not only admins who has something else to do .

Guests support for NC12

Hi Guys,

Was trying the Guests app in combination with the latest NC version.
However, the app unfortunately only works with NC10.

When I edit the info.xml to NC12, I got a PHP fatal;
PHP Fatal error: Class OCA\Guests\Settings\Admin contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (OCP\Settings\ISettings::getForm, OCP\Settings\ISettings::getSection) in /home/nc/www/apps/guests/settings/admin.php on line 57

Are there plans to update this app to support NC12? :-)

Thnx!

Non-whitelisted app icons showing when front_controller_active=false

Steps to reproduce

  1. Have your server configured without pretty URLs (front_controller_active false)
  2. Have for example calendar and contacts installed
  3. as admin: Whitelist some apps in guests admin page (do not whitelist calendar and contacts)
  4. login with a guest account

Expected behaviour

Calendar and Contacts don't show up in the app menu

Actual behaviour

Calendar, Contacts and all other apps do show up in the app menu

Default sharing permissions not being pulled on invitation

Steps to reproduce

  1. As admin, set the following sharing permissions:

image

image

  1. Share a folder with an already existing guest user and check the set permissions:

image

  1. Share a folder with a new guest user (=invite someone) and check the set permissions:
    image

  2. Change default sharing permissions:

image

  1. Share a folder with a new guest user (=invite someone) and check the set permissions:

image

Expected behavior

All default sharing permissions already apply to new invitees.

System information

NC 16.0.1
Guests 1.1.0

Cannot log off.

Latest make-compatible-with-nextcloud branch works great! :-)
However, the dropdown menu is empty, so that a guest user cannot log-off. Is this intentional?

bildschirmfoto 2017-08-29 um 18 06 43

This is the case with stable 12.0.2 and current master of NC.

Empty Admin settings page

If I enable the guest app on master (upcoming Nextcloud 16) there is a "Guest" admin settings entry but it renders an empty page. From looking at the code it looks like we don't have any admin settings. Are we plan to add something there or should we just remove it?

cc @icewind1991

class 'OC\\Files\\Storage\\Home' does not have a method 'checkPath'

When accessing Nextcloud as guest user I get multiple log entries in nextcloud log like

{"reqId":"gilEJiaDD5UviBTtE62n","level":3,"time":"2019-08-10T16:07:16+00:00","remoteAddr":"xx.xx.xx.xx","user":"xx@xx","app":"PHP","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/xx@xx/xx/xx.jpg","message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OC\Files\Storage\Home' does not have a method 'checkPath' at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php#506","userAgent":"Mozilla/5.0 (Linux; Android 9; BLA-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.89 Mobile Safari/537.36","version":"16.0.3.0","id":"5d4eebb4badb0"}

Nextcloud version 16.0.3
Guests version 1.1.1

Log Message "Undefined index: userID at .../apps/guests/lib/GuestManager.php#143" for old users

I've got a lot "Undefined index" messages if opening the "Guests" view in Admin settings. These are generated for all old users converted from the earlier versions of the app (with 'isGuest'=>1 in oc_preferences). Some earlier update converted the accounts to oc_guests_users table, but did not create the 'created_by' entry in oc_preferences.

While opening the "Guests" view in Admin settings, now the 'created_by' is missing for old users triggering this warning. Maybe you can add an isset($createdBy[$uid])?$createdBy[$uid]:'' in line 143 of GuestManager.php to avoid the message.

I created the missing entries in DB as workaround:
insert into oc_preferences select uid, 'guests','created_by','unknown' from oc_guests_users where uid not in (select userid from oc_preferences where appid='guests' and configkey='created_by');

Guest Sharing is not working

Hi Nextcloud-Team,

when I share a folder with a guest, the account activation works.

But right after the login, the guest user gets an "Internal Servererror".

[index] Error: RuntimeException: Storage could neither be inserted nor be selected from the database at <<closure>>

 0. ../lib/private/Files/Cache/Cache.php line 108
    OC\Files\Cache\Storage->__construct(OCA\Files_Trashb ... l})
 1. ../lib/private/Files/Storage/Home.php line 71
    OC\Files\Cache\Cache->__construct(OCA\Files_Trashb ... l})
 2. ../lib/private/Files/Storage/Wrapper/Wrapper.php line 393
    OC\Files\Storage\Home->getCache("files", OCA\Files_Trashb ... l})
 3. ../apps/guests/lib/Storage/DirMask.php line 197
    OC\Files\Storage\Wrapper\Wrapper->getCache("files", OCA\Files_Trashb ... l})
 4. ../lib/private/Files/Storage/Wrapper/Wrapper.php line 393
    OCA\Guests\Storage\DirMask->getCache("files", OCA\Files_Trashb ... l})
 5. ../lib/private/Files/Storage/Wrapper/Wrapper.php line 393
    OC\Files\Storage\Wrapper\Wrapper->getCache("files", OCA\Files_Trashb ... l})
 6. ../lib/private/Files/View.php line 1326
    OC\Files\Storage\Wrapper\Wrapper->getCache("files")
 7. ../lib/private/Files/View.php line 1382
    OC\Files\View->getCacheEntry(OCA\Files_Trashb ... l}, "files", "/")
 8. ../lib/private/Files/Filesystem.php line 859
    OC\Files\View->getFileInfo("/[email protected]/files", false)
 9. ../apps/files/lib/Controller/ViewController.php line 127
    OC\Files\Filesystem::getFileInfo("/", false)
10. ../apps/files/lib/Controller/ViewController.php line 170
    OCA\Files\Controller\ViewController->getStorageInfo()
11. ../lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Files\Controller\ViewController->index("", "", null, false)
12. ../lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files\Controller\ViewController {}, "index")
13. ../lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files\Controller\ViewController {}, "index")
14. ../lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("ViewController", "index", OC\AppFramework\ ... {}, {_route: "files.view.index"})
15. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "files.view.index"})
16. ../lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {_route: "files.view.index"})
17. ../lib/base.php line 975
    OC\Route\Router->match("/apps/files/")
18. ../index.php line 42
    OC::handleRequest()

GET /index.php/apps/files/
from 1.2.3.4 by [email protected] at 2019-10-02T20:18:45+00:00

guest account & impersonate

Impersonating a guest account as admin works; but one can not logout from impersonating ...

Used versions:
guests 1.1.1
impersonate 1.3.0
nextcloud 16.0.3

Guest accounts created while email nextcloud server not configured

If you try creating a guest account if the email server is not properly configured you will be prompted with 'Error while sharing Couldn't send reset email. Please contact your administrator.'. However even though the error is given the guest account is created anyway.

Adjust sharing type in core

The app uses the sharing type 4 which is already used, we have to change this to 8 and register a new sharing type in core.

Actions menu in sharing sidebar empty for guests

When clicking on a sharee in the sharing sidebar, the sharee's clickable email address and (if installed) a hook to a Talk conversation show up in a little pop-over:

image

Clicking on a guest user however only says No action available:

image

Server 16.0.1
Guests 1.1.0

Chose language for guest invitation

Often organizations want to invite guest users from different countries. Therefore they need to be able to create a guest account and define the language in which the invitation is send out. (E.g. a employ in Japan sends an invitation to a partner in the US. In this case they needs to be able to select English as language for the invitation mail instead of their own language, Japanese)

The pop-up might be a good place to add a drop-down to select the language for the invitation:

image

Use Nextcloud mailing classes

We need to adjust the mails from ownCloud anyways because of the footer etc. โ€“ So we can just migrate to our new fancy mails instead ๐Ÿ˜„

Hide other users from guest users

I think the safe solution is to modify the search user API to always return an empty result for guest users. This way we make sure that we don't miss anything and guests should be always isolated from the rest of the system. Additionally I would hide the people menu on the top right for guest users, it doesn't make sense to have a menu which is always empty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.