[英]Is it some way to create different usage rights for a same page WITH NO logging?
I have no idea what solution could does something like this. 我不知道什么解决方案可以做这样的事情。
I need webpage with 2 squares which will print on some big screen. 我需要有2个正方形的网页,并将其打印在一些大屏幕上。 There are 2 users, every of them needs access of writing in own square only on this page.
有2位用户,每个用户仅需要在此页面上以自己的正方形书写权限。
<div class="square1">
<input type="text" id="square1">
</div>
<div class="square2">
<input type="text" id="square2">
</div>
So, for example if I am user1 than input in square1 only is enabled for me and others inputs are disabled. 因此,例如,如果我是user1,那么仅对我启用了square1中的输入,而禁用了其他输入。
There are no troubles to make it with a logging service but is there some solution to make this functionality by using different weblinks for every user? 使用日志记录服务没有麻烦,但是是否有一些解决方案可以通过为每个用户使用不同的Web链接来实现此功能?
So, if I am user1 than I have such weblink: www.thisideaweb.link/special-page.html?special-weblink-for-user1
and I could edit only square1 input on this page and if I am user2 than my link is: www.thisideaweb.link/special-page.html?special-weblink-for-user2
and I could edit only square2 input? 因此,如果我是user1而不是我拥有这样的Web链接:
www.thisideaweb.link/special-page.html?special-weblink-for-user1
special-weblink-for-user1,并且我只能编辑此页面上的square1输入,并且如果我是user2而不是我的链接是: www.thisideaweb.link/special-page.html?special-weblink-for-user2
?special-weblink-for-user2,我只能编辑square2输入吗?
You can leverage ActivatedRoute
to get the url and parameters. 您可以利用
ActivatedRoute
获取url和参数。 Once you get url and params you can perform your activation
of square. 一旦获得url和params,就可以执行Square
activation
。
Inject ActivatedRoute 注入ActivatedRoute
constructor(private route: ActivatedRoute) { }
Read the URL 阅读网址
ngOnInit() {
this.route.queryParamMap.subscribe(params => {
this.route.url //<-- it will give the url
//Enable/Disable the Sqaure
});
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.