Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi user shaarli #15

Closed
nodiscc opened this issue Aug 3, 2014 · 10 comments
Closed

Multi user shaarli #15

nodiscc opened this issue Aug 3, 2014 · 10 comments
Labels

Comments

@nodiscc
Copy link
Member

nodiscc commented Aug 3, 2014

Note: work started in #11 to have configurable data/, tmp/, tpl/.... paths. Going further, we could (for shaarlis that have optional multiuser enabled), have https://my.shaarli.url/u/georges and https://my.shaarli.url/u/john be shorthands for https://my.shaarli.url/?user=georges, let shaarli detect the user param, and serve shaarli with different data paths (eg. $SHAARLI_DATA_DIR/$user, $SHAARLI_TPL_DIR/$user...)

@e2jk
Copy link

e2jk commented Aug 4, 2014

I am not personally in favor of this, which would add a large level of complexity to the code. I am not opposed to it strictly speaking, but I see this as a stark departure of the KISS (Keep It Simple, Stupid) principle that Shaarli is built upon.

@Sbgodin
Copy link

Sbgodin commented Aug 4, 2014

Indeed, I think about system such as one deployment many user. Shaarly could be installed one and have a data/options.php taking account of things like the domain name to automatically switch to a configuration or another. Say that all data are in a directory but each subdirectory contains the data for a given domain name.

@nodiscc
Copy link
Member Author

nodiscc commented Aug 5, 2014

I am not personally in favor of this, which would add a large level of complexity to the code

True.

For multiple shaarlis, admins can install a lot of shaarli instances with very little effort /var/www/shaarli/{user1,user1,user3/}...

I think the original concern about multi-user was about having 3 "roles" and types of links instead of 2:

  • admin (current single user), can access all links
  • guest (not logged in), can access public links
  • "user" (logged in with another user/pw) can access public and "restricted" links (not private but not visible for not-logged in guests)

This is not an easy task.

Should we close this bug for now?

@Sbgodin
Copy link

Sbgodin commented Aug 5, 2014

Yes.

@nodiscc nodiscc added wontfix and removed question labels Aug 10, 2014
@nodiscc nodiscc closed this as completed Aug 10, 2014
@xavierle
Copy link

xavierle commented Aug 15, 2014

to me this is sad again that you refuse to make shaarli multiuser

installing different shaarli instances is different that having one instances where all bookmarks can be shared/listed between all users

@nodiscc
Copy link
Member Author

nodiscc commented Aug 15, 2014

@xavierle patches welcome if you find a way to implement this without significanty increasing complexity of the code.

@xavierle
Copy link

xavierle commented Aug 15, 2014

i was coming back to this discussion

because i think i misunderstood one point

I am getting a new try of shaarli to change from semanticscuttle
after one test of the version from roultebie that was last year multiuser capable)

you wrote
"for shaarlis that have optional multiuser enabled"
and " short of https://my.shaarli.url/?user=georges,"

so actually it would be possible to get a real shaarli multiuser ?

where is there any documentation about how to do it ?

i only found some recommendations to make one independant shaarli installation per user
(which is not that kiss to my point of view)

about patches
i am a not a coder i can just make some system administration for friends

@nodiscc
Copy link
Member Author

nodiscc commented Aug 15, 2014

for shaarlis that have optional multiuser enabled

This is not implemented, was just a suggestion for a possible implementation. We concluded it was not KISS-friendly at all. I recommend having 1 shaarli install per user (e.g. multiple directories like /var/www/shaarli/georges/, /var/www/shaarli/john/. It is actually the simplest thing you can do. You could manually list your shaarlis in /var/www/shaarli/index.html or just let your web server build the index.

@poVoq
Copy link

poVoq commented Feb 1, 2018

Not even a chance for very basic multi-user? I basically just want to allow other people (2-3) to post on my Shaarli for jointly curating links and notes, but I would prefer them not having full admin access.

@virtualtam
Copy link
Member

virtualtam commented Feb 1, 2018

Hi @poVoq,

Long story short, going multi-user requires too many changes to core features of Shaarli, especially how links/notes are handled (storage & code representation). Related work has been planned for (far-)future releases, notably #445 and #953.

In the meantime, the best way to use Shaarli in a social way is to rely on Atom/RSS feeds to aggregate data from several instances.

See also #907 for a related discussion and possible solutions.

ajabep added a commit to ajabep/Shaarli that referenced this issue Apr 2, 2021
When we try to access the atom feed and have no bookmarks, it raised the following exception :

```
Call to a member function reorder() on array /webroot/application/bookmark/BookmarkFileService.php:143
#0 /webroot/application/feed/FeedBuilder.php(106): Shaarli\Bookmark\BookmarkFileService->search(Array, 'public', false, false, true)
shaarli#1 /webroot/application/front/controller/visitor/FeedController.php(47): Shaarli\Feed\FeedBuilder->buildData('atom', Array)
shaarli#2 /webroot/application/front/controller/visitor/FeedController.php(20): Shaarli\Front\Controller\Visitor\FeedController->processRequest('atom', Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#3 [internal function]: Shaarli\Front\Controller\Visitor\FeedController->atom(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
shaarli#4 /webroot/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
shaarli#5 /webroot/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
shaarli#6 /webroot/application/front/ShaarliMiddleware.php(55): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#7 [internal function]: Shaarli\Front\ShaarliMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
shaarli#8 /webroot/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Array, Array)
shaarli#9 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
shaarli#10 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
shaarli#11 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#12 /webroot/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#13 /webroot/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#14 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#15 /webroot/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#16 /webroot/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#17 /webroot/index.php(177): Slim\App->run(true)
shaarli#18 {main}
```
ArthurHoaro pushed a commit to ArthurHoaro/Shaarli that referenced this issue May 8, 2021
When we try to access the atom feed and have no bookmarks, it raised the following exception :

```
Call to a member function reorder() on array /webroot/application/bookmark/BookmarkFileService.php:143
#0 /webroot/application/feed/FeedBuilder.php(106): Shaarli\Bookmark\BookmarkFileService->search(Array, 'public', false, false, true)
#1 /webroot/application/front/controller/visitor/FeedController.php(47): Shaarli\Feed\FeedBuilder->buildData('atom', Array)
#2 /webroot/application/front/controller/visitor/FeedController.php(20): Shaarli\Front\Controller\Visitor\FeedController->processRequest('atom', Object(Slim\Http\Request), Object(Slim\Http\Response))
#3 [internal function]: Shaarli\Front\Controller\Visitor\FeedController->atom(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#4 /webroot/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
shaarli#5 /webroot/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
shaarli#6 /webroot/application/front/ShaarliMiddleware.php(55): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#7 [internal function]: Shaarli\Front\ShaarliMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
shaarli#8 /webroot/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Array, Array)
shaarli#9 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
shaarli#10 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
shaarli#11 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#12 /webroot/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#13 /webroot/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#14 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#15 /webroot/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#16 /webroot/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
shaarli#17 /webroot/index.php(177): Slim\App->run(true)
shaarli#18 {main}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants