Giter Site home page Giter Site logo

doorman's People

Contributors

ahrasis avatar dependabot[bot] avatar dsevillamartin avatar flarum-bot avatar franga2000 avatar imorland avatar ipurpl3x avatar karaok491 avatar kyrnedev avatar luceos avatar manaszon avatar nxta avatar pepar avatar the-turk avatar tolgaaaltas 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

Watchers

 avatar  avatar  avatar  avatar

doorman's Issues

Add a bulk import function for invitation codes

If you import many invitation codes at one time, the whole work will be very cumbersome

So I think a tool for batch importing invitation codes should be added to reduce the workload (although this will keep the size of the database growing)

Beta 14 issues

I got this after i've installed and enabled the new updated fof/doorman (v0.2.0)
It seems to work (sign up checks the invite code correctly), but I can't open settings in the admin panel to add new codes – it does nothing and produces no log in Console or network request

image

beta 15 issue

Keep getting this message when trying to install:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires fof/doorman ^0.3.0 -> satisfiable by fof/doorman[0.3.0].
- fof/doorman 0.3.0 requires flarum/core ^0.1.0-beta-15 -> found flarum/core[dev-master, v0.1.0-beta.15, 0.1.x-dev (alias of dev-master)] but it does not match your minimum-stability.

Installation failed, deleting ./composer.json.

Feature request for Doorman

Hey
I have an extension proposal that I need for my forum:
It would be nice if users could also create invite codes.
The number of invite codes that a user can create should be limited by an admin. However, the whole thing should be deactivated in the menu.
It should also be possible for admins to issue invites to users or to a user group with a click, so that the invites are assigned to a user and they can distribute them themselves. It would also be great if the admin / mod could see which user used the invite.

Any possible way to show registerd users their invite code at profile page?

Feature Request

Hello, I'm considering to use invite code for some other ways, which needs users getting their invite code. Showing invite code on the profile page is fine.
By the other way, if the feature above is not a good idea, I shall finish it by myself. How can I add the invitecode as a property to the app Object shown in browser's console by entering console.log(app)?
Sorry for my bad English:(

Can't send invite emails with maxUses == 0

When "Max Uses" for an invite is set to 0, which is supposed to mean unlimited, the "Send Invite Codes" modal doesn't let you add any emails to its list.

The culprit seems to be the if statement in the following snippet, as it will always succeed if maxUses == 0 and therefore not add the email to the list.

if (this.emails.length + 1 > this.doorkey.data.attributes.maxUses) {
this.alert = ({ type: 'error' }, app.translator.trans('fof-doorman.admin.modal.max_use_conflict'));
m.redraw();

Curiously enough, for me at least (on Firefox 81), the alert that is supposed to show up isn't seen either, so there is no indicator of anything being wrong (besides it, well, not working).

EDIT: I'm running beta14- branch so, so the alert problem might be related to that, but the core issue can't be as the relevant code is the same as in master.

Mobile Friendly

The admin settings for Doorman could be improved to be more mobile friendly.

Single Key Multiple Groups

I wish this extension will support single key multiple groups per user to be added upon their activation.

An API for invitation code generation/addition

Feature Request

Currently, there is no way to automate the process of adding a key.

Describe the solution you'd like

An API access point (URL, POST) so that invitation codes can be added automatically from other apps,
generated on the fly by request, and deleted/disabled on request.

This would allow, for example, a wordpress site to issue it's own unique one time use code and automatically hand it to the user, without having the administrator manually intervene and issue one themselves and give them to the users.

You can see how this would stack up if there are lots of users that you want individual invite codes for.

Describe alternatives you've considered

I guess a macro could work, but it is not practical.

Email modal no longer works

Bug Report

When you have created an invite code, the email button doesn't work and throws errors in console.

Screenshots

image

Environment

  • Flarum version: 1.2.0
  • Extension version: 1.0.1

Add the option of Invite Code (optional)

As requested by Faaju at Doorman thread in Flarum Discuss:

Could you add the option of Invite Code (optional)?
What would it look like?

After selecting this option in the admin panel, the user could leave the code field blank during registration and register without entering the code.

Optional setting isn’t working.

Bug Report

Current Behavior
When trying to register without an invite code, registration is blocked with a “Please enter an invite code” error, despite the fact that we have “allow public sign up” enabled.

Steps to Reproduce

  1. Go to the admin panel
  2. Click to enable “Make invite code optional when signing up.”
  3. Log out
  4. Attempt to sign up for an account without an invite code
  5. An error is received “please enter an invite code.”

Expected Behavior
Users should still be able to register even if they haven’t received an invite code (which just adds them to a special group.)

Screenshots
IMG_2359
IMG_2363

Environment

  • Flarum version: 8.1.0
  • Extension version: 1.1.2
Output of "php flarum info", run this in terminal in your Flarum directory.

Possible solution(s)

Additional Context
Add any other context about the problem here.

doorman breaks with "tr" locale

When locale is set to "tr" and doorman is activated, Flarum crashes and logs:

Next Symfony\Component\Translation\Exception\InvalidResourceException: Error parsing YAML, invalid file "/app/vendor/reflar/doorman/resources/locale/tr.yml" in /app/vendor/symfony/translation/Loader/YamlFileLoader.php:50
Stack trace:
#0 /app/vendor/symfony/translation/Loader/FileLoader.php(36): Symfony\Component\Translation\Loader\YamlFileLoader->loadResource('/app/vendor/ref...')
#1 /app/vendor/flarum/core/src/Locale/PrefixedYamlFileLoader.php(23): Symfony\Component\Translation\Loader\FileLoader->load('/app/vendor/ref...', 'tr', 'messages')
#2 /app/vendor/symfony/translation/Translator.php(381): Flarum\Locale\PrefixedYamlFileLoader->load(Array, 'tr', 'messages')
#3 /app/vendor/symfony/translation/Translator.php(277): Symfony\Component\Translation\Translator->doLoadCatalogue('tr')
#4 /app/vendor/symfony/translation/Translator.php(314): Symfony\Component\Translation\Translator->initializeCatalogue('tr')
#5 /app/vendor/symfony/translation/Translator.php(299): Symfony\Component\Translation\Translator->dumpCatalogue('tr', Object(Symfony\Component\Config\ConfigCache))
#6 /app/vendor/symfony/config/ConfigCacheFactory.php(46): Symfony\Component\Translation\Translator->Symfony\Component\Translation\{closure}(Object(Symfony\Component\Config\ConfigCache))
#7 /app/vendor/symfony/translation/Translator.php(300): Symfony\Component\Config\ConfigCacheFactory->cache('/app/public/../...', Object(Closure))
#8 /app/vendor/symfony/translation/Translator.php(265): Symfony\Component\Translation\Translator->initializeCacheCatalogue('tr')
#9 /app/vendor/symfony/translation/Translator.php(241): Symfony\Component\Translation\Translator->loadCatalogue('tr')
#10 /app/vendor/flarum/core/src/Locale/Translator.php(35): Symfony\Component\Translation\Translator->getCatalogue('tr')
#11 /app/vendor/symfony/translation/Translator.php(198): Flarum\Locale\Translator->getCatalogue('tr')
#12 /app/vendor/flarum/core/src/Api/Serializer/GroupSerializer.php(66): Symfony\Component\Translation\Translator->trans('core.group.admi...')
#13 /app/vendor/flarum/core/src/Api/Serializer/GroupSerializer.php(53): Flarum\Api\Serializer\GroupSerializer->translateGroupName('Admin')

php flarum info:

Flarum core 0.1.0-beta.10
PHP version: 7.2.19-0ubuntu0.18.04.2
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, sodium, session, standard, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+------------------------------+----------------+--------+
| Flarum Extensions            |                |        |
+------------------------------+----------------+--------+
| ID                           | Version        | Commit |
+------------------------------+----------------+--------+
| flarum-approval              | v0.1.0-beta.8  |        |
| flarum-bbcode                | v0.1.0-beta.8  |        |
| flarum-emoji                 | v0.1.0-beta.10 |        |
| flarum-flags                 | v0.1.0-beta.9  |        |
| flarum-likes                 | v0.1.0-beta.9  |        |
| flarum-lock                  | v0.1.0-beta.9  |        |
| flarum-markdown              | v0.1.0-beta.10 |        |
| flarum-mentions              | v0.1.0-beta.10 |        |
| flarum-statistics            | v0.1.0-beta.9  |        |
| flarum-sticky                | v0.1.0-beta.9  |        |
| flarum-subscriptions         | v0.1.0-beta.9  |        |
| flarum-suspend               | v0.1.0-beta.9  |        |
| flagrow-sitemap              | 0.2.0          |        |
| fof-default-user-preferences | 0.2.0          |        |
| migratetoflarum-canonical    | 0.1.0          |        |
| flarumtr-turkish-lang        | v0.1.9         |        |
| flarum-tags                  | v0.1.0-beta.10 |        |
| fof-user-bio                 | 0.1.3          |        |
| fof-reactions                | 0.1.0          |        |
| tolgaaaltas-turkish          | 0.1.10.5       |        |
| v17development-seo           | 1.0.2          |        |
| fof-secure-https             | v0.1.0         |        |
| fof-ban-ips                  | dev-master     |        |
| flarum-embed                 | v0.1.0-beta.9  |        |
| fof-transliterator           | 0.1.1          |        |
| reflar-doorman               | 0.1.4          |        |
+------------------------------+----------------+--------+
Base URL: https://ekofibilim.flarum.cloud
Installation path: /data/host/ekofibilim/app
Debug mode: off

Alert messages are not working

Steps to reproduce:

  1. Create an invite code.
  2. Open "Send Invite Codes" modal by clicking the mail button.
  3. Type an invalid e-mail address.
  4. Hit the "space".
  5. There is an error in console log says "DOMException: String contains an invalid character"

because these are not the way how we initialize alerts:

this.alertAttrs = ({ type: 'error' }, app.translator.trans('fof-doorman.admin.modal.max_use_conflict'));

this.alertAttrs =
({ type: 'error' },
app.translator.trans('fof-doorman.admin.modal.invalid_emails', { emails: this.badEmails.join(', ') }));

app.alerts.show({ type: 'success' }, app.translator.trans('fof-doorman.admin.modal.success'));

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.