Giter VIP home page Giter VIP logo

Comments (7)

jeffgreco13 avatar jeffgreco13 commented on June 18, 2024 3

Hey @telkins @caendesilva there was actually a bit of conversation about this in the breezy channel. At the time we deemed it not necessary, but I think this would make sense as a config option.
I am going to review this in my next release!

from filament-breezy.

caendesilva avatar caendesilva commented on June 18, 2024 1

I was thinking that this should be added as well. Both because it prevents a password from being changed (say if you stay logged in while you leave your desk), but it also prevents against accidental changing.

from filament-breezy.

21p-sk avatar 21p-sk commented on June 18, 2024 1

My solution for this problem:

Custom ProfilePage

[...]
use JeffGreco13\FilamentBreezy\Pages\MyProfile as BaseProfile;

class UserProfile extends BaseProfile
[...]
[...]
protected function getUpdatePasswordFormSchema(): array
{
    return [
        Forms\Components\TextInput::make('current_password')
            ->label(__('Current Password'))
            ->password()
            ->currentPassword()
            ->required(),
        Forms\Components\TextInput::make('new_password')
            ->label(__('filament-breezy::default.fields.new_password'))
            ->password()
            ->rules([Password::defaults()])
            ->different('current_password')
            ->required(),
        Forms\Components\TextInput::make('new_password_confirmation')
            ->label(__('filament-breezy::default.fields.new_password_confirmation'))
            ->password()
            ->same('new_password')
            ->required(),
    ];
}

public function updatePassword()
{
    parent::updatePassword();

    $this->reset(['current_password']);
}
[...]

from filament-breezy.

telkins avatar telkins commented on June 18, 2024

Hey @telkins @caendesilva there was actually a bit of conversation about this in the breezy channel. At the time we deemed it not necessary, but I think this would make sense as a config option. I am going to review this in my next release!

Thx, @jeffgreco13 . Let me know if there's anything I can do to help. 🤓

from filament-breezy.

caendesilva avatar caendesilva commented on June 18, 2024

My solution for this problem:

I think this looks really nice, and since it's so simple and lightweight it shouldn't add much footprint to the package by offering it as a config option in the base class.

from filament-breezy.

StanMenten-bp avatar StanMenten-bp commented on June 18, 2024

Any follow up on this one?

from filament-breezy.

jeffgreco13 avatar jeffgreco13 commented on June 18, 2024

Available in Breezy v2

from filament-breezy.

Related Issues (20)

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.