Skip to content

feat(accounts): enable auto-login on treeland - #3442

Open
glyvut wants to merge 1 commit into
linuxdeepin:masterfrom
glyvut:master
Open

feat(accounts): enable auto-login on treeland#3442
glyvut wants to merge 1 commit into
linuxdeepin:masterfrom
glyvut:master

Conversation

@glyvut

@glyvut glyvut commented Aug 26, 2026

Copy link
Copy Markdown

Remove treeland restriction on auto login settings and only hide quick login option on treeland.

移除treeland对自动登录设置的限制,在treeland下仅隐藏快速登录选项。

Log: 启用treeland自动登录
PMS: BUG-294419
Influence: treeland环境下账户模块现在支持自动登录。


具体配置需 dde-daemon 处理 linuxdeepin/dde-daemon#1224

Summary by Sourcery

New Features:

  • Enable automatic login settings in Treeland environments while keeping the quick login option hidden there.

Remove treeland restriction on auto login settings and only hide
quick login option on treeland.

移除treeland对自动登录设置的限制,在treeland下仅隐藏快速登录选项。

Log: 启用treeland自动登录
PMS: BUG-294419
Influence: treeland环境下账户模块现在支持自动登录。
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: glyvut

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates account settings visibility so Treeland supports auto-login configuration, while the quick-login option remains hidden there; related daemon-side configuration is expected to be handled separately.

Flow diagram for Treeland account login settings visibility

flowchart TD
    A[Account settings] --> B{Treeland environment?}
    B -->|No| C[Show available auto-login and quick-login options]
    B -->|Yes| D[Show auto-login settings]
    D --> E[Hide quick-login option]
Loading

File-Level Changes

Change Details Files
Allows the account auto-login settings group to remain available on Treeland while selectively hiding only the quick-login control.
  • Removed the Treeland exclusion from the parent login-settings group visibility condition.
  • Added a Treeland exclusion specifically to the quick-login item visibility condition.
  • Preserved existing visibility checks for automatic login and passwordless login options.
src/plugin-accounts/qml/AccountSettings.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@glyvut
glyvut marked this pull request as ready for review August 26, 2026 08:49

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分 (大于70分通过)

■ 【总体评价】

代码审查通过
总体评分 100 分,大于 70 分通过阈值,代码质量符合要求。本次提交在 treeland 上启用自动登录功能,代码变更简洁明确,逻辑正确,无安全漏洞。

■ 【详细分析】

  • 1.语法逻辑(优秀)✓通过

具体分析内容,指出代码位置、函数名及问题原因
潜在问题:无
建议:语法正确,逻辑清晰,无需修改

  • 2.代码质量(优秀)✓通过

具体分析内容
潜在问题:无
建议:代码结构清晰,变更聚焦,平台条件判断从父容器正确迁移到子组件

  • 3.代码性能(优秀)✓通过

具体分析内容
潜在问题:无
建议:性能良好,资源使用合理,QML 属性绑定效率不受影响

  • 4.代码安全(优秀,存在 0 个安全漏洞)✓通过

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
总体风险描述,指出漏洞位置和攻击面
未发现安全漏洞

  • 建议:存在0个安全漏洞,UI 可见性变更无安全风险
  • 5.项目规范(不计入评分,仅作为维护参考)

项目规范检查(21项):

  • UOS 大小写(文档中全大写,代码中按代码规范):✓ 符合
  • deepin 大小写(文档中全小写包括首字母,代码中按代码规范):✓ 符合
  • DDE 使用(专有名词,禁止拆开使用如 Deepin Desktop Environment):✓ 符合
  • 文件名中的 dde(文件名中 dde 全小写):✓ 符合
  • 项目名称(全小写、-连接、不超过2个-):✓ 符合
  • 文件命名(全小写、-连接,不使用_):✓ 符合
  • DBus 命名(倒置域名格式,如 org.deepin.DDE1.Accounts):✓ 符合
  • 版权信息(deepin 必须小写):✓ 符合
  • Git 分支命名(上游upstream/*、主干master、研发develop/*project/*、发布release/*):✓ 符合
  • Debian Changelog 版本规范(版本号格式是否符合统信软件版本规范):✓ 符合
  • systemd 服务检查(后台程序是否通过 systemd service 启动):✓ 符合
  • systemd 权限限制(是否包含 User=、ProtectSystem=、NoNewPrivileges= 等最小权限配置):✓ 符合
  • 新增自启动程序评审(未经过系统部/架构部评审的自启动程序):✓ 符合
  • prerm/preinst/postrm/postinst 机制评审(是否使用该机制实现功能,需提供评审记录):✓ 符合
  • 交付版本 debug 信息(禁止带有 debug 信息):✓ 符合
  • 不安全密码算法(是否使用 md5/sha1/des 等不安全算法,需安全部评审):✓ 符合
  • 隐私与敏感信息(代码日志中是否包含用户名、密钥、口令等敏感信息):✓ 符合
  • IPC 敏感数据保护(进程间通信敏感数据是否使用 memfd/hash/密钥协商协议保护):✓ 符合
  • FHS 文件系统分层规范(是否写入动态数据到 /usr、/opt 等静态目录):✓ 符合
  • DBus 安全编码要求(systemd conf 变动、allow own 字段是否仅 root 或非普通用户):✓ 符合
  • 多语言翻译与本地化(源码国际化、翻译文件同步更新、术语一致性):✓ 符合
    潜在问题:无
    建议:无

■ 【改进建议代码示例】

// 本次变更无需修复,代码实现正确
// src/plugin-accounts/qml/AccountSettings.qml

// 父容器:移除 treeland 限制,使登录设置在 treeland 上可见
DccObject {
    id: acountSettings
    visible: autoLongin.visible || noPassword.visible || quickLogin.visible

    // quickLogin:添加 treeland 限制,保持快速登录在 treeland 上隐藏
    DccObject {
        id: quickLogin
        visible: dccData.isQuickLoginVisible && !DccApp.isTreeland()
    }

    // autoLongin:无 treeland 限制,在 treeland 上可见
    DccObject {
        id: autoLongin
        visible: dccData.isAutoLoginVisable()
    }

    // noPassword:无 treeland 限制,在 treeland 上可见
    DccObject {
        id: noPassword
        visible: dccData.isNoPassWordLoginVisable()
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants