Skip to content

feat: mandatory watermark required for security level 4#673

Closed
luojiahao11 wants to merge 1 commit intolinuxdeepin:masterfrom
luojiahao11:master
Closed

feat: mandatory watermark required for security level 4#673
luojiahao11 wants to merge 1 commit intolinuxdeepin:masterfrom
luojiahao11:master

Conversation

@luojiahao11
Copy link

add mandatory watermark about user info, time and user usec_smodel label

feat: 等保4级要求必须存在包含用户信息,时间和用户安全标签的水印

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: luojiahao11

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2025

CLA Assistant Lite bot:
提交邮箱中包含我们的合作伙伴,但您似乎并非合作伙伴的成员或对接人,请联系相关对接人将您添加至组织之中,或由其重新发起 Pull Request。
The commit email domain belongs to one of our partners, but it seems you are not yet a member of the current organization, please contact the contact person to add you to the organization or let them submit the Pull Request.

You can retrigger this bot by commenting recheck in this Pull Request

@deepin-ci-robot
Copy link
Contributor

Hi @luojiahao11. Thanks for your PR. 😃

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Jul 28, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#673
@deepin-ci-robot
Copy link
Contributor

Hi @luojiahao11. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

public:
BaseWatermarkItem(QGraphicsItem *parent = nullptr) : QGraphicsItem(parent) {
m_font.setFamily("SourceHanSansSC");
m_font.setPointSize(12);
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的字体需要跟随系统么,颜色需要适配暗亮色主题么?

Copy link
Author

Choose a reason for hiding this comment

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

不需要,此水印字体设置成固定即可

};

// 基底水印图元类
class BaseWatermarkItem : public QGraphicsItem
Copy link
Contributor

Choose a reason for hiding this comment

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

能共用WaterMark这个类来实现默认水印么?

Copy link
Author

Choose a reason for hiding this comment

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

OK

QString userId = getUserId();
QPair<int,int> securityLabel = getUserSecurityLabel();
QString timeStr = QDateTime::currentDateTime().toString(DATE_TIME_FORMAT);
QString waterMarkText = QString("时间: %1\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

需要翻译吧,

Copy link
Author

Choose a reason for hiding this comment

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

不需要

Copy link
Contributor

Choose a reason for hiding this comment

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

“用户”这种汉字,不需要翻译么,应该要吧,

QString userName = getUserName();
QString userId = getUserId();
QPair<int,int> securityLabel = getUserSecurityLabel();
QString timeStr = QDateTime::currentDateTime().toString(DATE_TIME_FORMAT);
Copy link
Contributor

Choose a reason for hiding this comment

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

水印时间需要一直动态更新么,

Copy link
Author

Choose a reason for hiding this comment

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

需要准确时间,需要动态更新


bool ok = false;
quint32 hexValue = 0;
if (!hexString.isEmpty() && hexString.startsWith("0x")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

qt中的字符串转数字,应该能够识别0x,自动转为16进制的值,

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Jul 30, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#673
return d_ptr->previewPages();
}

void WaterMark::setBaseWatermark()
Copy link
Contributor

Choose a reason for hiding this comment

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

是不是可以不在watermark里添加这个方法么,它只是text类型的水印而已,业务逻辑可以放在设置的地方,

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Jul 30, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#673
add mandatory watermark about user info, time and  user usec_smodel label

feat: 等保4级要求必须存在包含用户信息,时间和用户安全标签的水印
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Jul 30, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#673
#include <cups/ppd.h>

#include <pwd.h>
#include <selinux/selinux.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

这个加个debian/control的依赖,

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jul 31, 2025

TAG Bot

New tag: 5.7.20
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #674

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Aug 14, 2025

TAG Bot

New tag: 5.7.21
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #680

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Sep 4, 2025

TAG Bot

New tag: 5.7.22
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #683

@18202781743
Copy link
Contributor

问题太久没处理,先关闭,

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants