Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74940

Re: Network/multi-user program

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'say,': 0.05; 'level,': 0.07; '22,': 0.09; 'app,': 0.09; 'framework.': 0.09; 'permissions': 0.09; 'portions': 0.09; 'read-only': 0.09; 'sql,': 0.09; 'way:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'assume': 0.14; 'damage.': 0.16; 'fiddle': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'python-list,': 0.16; 'python;': 0.16; 's/he': 0.16; 'simplified': 0.16; 'simplifies': 0.16; 'subject:program': 0.16; 'subject:user': 0.16; 'utterly': 0.16; 'prevent': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'app': 0.19; 'trying': 0.19; 'options.': 0.19; 'examples': 0.20; '>>>': 0.22; 'network,': 0.22; 'cc:addr:python.org': 0.22; 'regardless': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'login': 0.25; 'sort': 0.25; 'equivalent': 0.26; 'task': 0.26; 'subject:/': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'chris': 0.29; 'am,': 0.29; 'absolute': 0.30; 'database,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'easier': 0.31; 'posting': 0.31; 'that.': 0.31; 'accidentally': 0.31; 'breaking': 0.31; 'explained': 0.31; 'yes.': 0.31; 'figure': 0.32; 'guess': 0.33; 'level.': 0.33; 'could': 0.34; 'advice': 0.35; 'knows': 0.35; 'something': 0.35; 'case,': 0.35; 'etc': 0.35; "who's": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'transition': 0.36; 'entry': 0.36; "i'll": 0.36; 'possible': 0.36; 'application': 0.37; 'two': 0.37; 'level': 0.37; 'system,': 0.38; 'security,': 0.38; 'issue': 0.38; 'users': 0.40; 'how': 0.40; 'even': 0.60; 'access,': 0.60; 'everybody': 0.60; 'solve': 0.60; 'black': 0.61; 'entire': 0.61; 'course': 0.61; 'simple': 0.61; "you're": 0.61; 'first': 0.61; "you'll": 0.62; 'soon': 0.63; 'box,': 0.64; 'connecting': 0.64; 'more': 0.64; 'limit': 0.70; 'jul': 0.74; 'gain': 0.79; '(probably': 0.84; 'elevated': 0.84; 'monte': 0.84; 'so...': 0.84; 'start.': 0.84; 'subject:Network': 0.84; 'tie': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=SkLGvcFMTYvUsT5KmPGTyDpSfzyXUk4DxsVlIXqWY98=; b=i2NWgHuY3lMIgyK2Dwh5Nd9QITKddZngK4zlAiEAKYo71uPY8OkkJ1We0XoeXW7oWe 50iOEy9zgDs4i7fEiTCb6q7EeeeALlxe/kCBc/eMiLn7dDCvAxGqzXs3ApUH2gPuVG8z mlg+67s7K8ScTpLnpJSvTPKoMp3VzscthHzl4XaNd60aOHs+ZKH2OZRWwsCW5cqEQC6O cfyj7vANOIIRu4yVPwWOHGpxZSnK3BAdDGrZHlRX3MiLO2eWIx/iV2NgHW9Wm7W/PzuQ Z9Dtehb25Yf0BGEWT0Y76HNSYqbZxRznJhx3vS2PiAwGd5P2iTqoOQdSNJ78NA5cG8wm m1EA==
MIME-Version 1.0
X-Received by 10.220.95.132 with SMTP id d4mr31928593vcn.33.1405967187625; Mon, 21 Jul 2014 11:26:27 -0700 (PDT)
In-Reply-To <slrnlsqm8h.evp.memilanuk@machin-shin.milanuk.lan>
References <slrnlsqelq.evp.memilanuk@machin-shin.milanuk.lan> <CAPTjJmqmGEVr8-DApUf5zUt3QpL+9=rOiweyzc0Z9thtBEpO=w@mail.gmail.com> <slrnlsqm8h.evp.memilanuk@machin-shin.milanuk.lan>
Date Tue, 22 Jul 2014 04:26:27 +1000
Subject Re: Network/multi-user program
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12141.1405967192.18130.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1405967192 news.xs4all.nl 2885 [2001:888:2000:d::a6]:34840
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74940

Show key headers only | View raw


On Tue, Jul 22, 2014 at 4:16 AM, Monte Milanuk <memilanuk@invalid.com> wrote:
> On 2014-07-21, Chris Angelico <rosuav@gmail.com> wrote:
>> On Tue, Jul 22, 2014 at 2:07 AM, Monte Milanuk <memilanuk@invalid.com> wrote:
>>> So I guess I'm asking for advice or simplified examples of how to
>>> go about connecting a client desktop app to a parent/master desktop app,
>>> so I can get some idea of how big of a task I'm looking at here, and
>>> whether that would be more or less difficult than trying to do the
>>> equivalent job using a web framework.
>>
>> Easier way: Don't have a "master desktop app", but instead have a
>> master database. Since you're posting this to python-list, I'll assume
>> you currently intend writing this in Python; you can make a really
>> simple transition from single-user-single-desktop to a networked
>> system, although of course you'll want to think in terms of multiple
>> users from the start.
>
> So... if everybody is using the same application to access the same
> database, how would you prevent say, a data entry user from accidentally
> breaking something above their pay-grade?  Set up some sort of
> role-based privilege system to limit them to write access for some
> portions and read-only for others?

That would be one way, yes. The first question you'd need to ask is:
How do you know who's data-entry and who's admins? As soon as you
solve that (probably with some sort of login), you tie the access
level to that.

If you need absolute security, you would have the user enter a login
and password which would actually be the database credentials. Then
you grant exact rights in the database manager, permitting ONLY what
that user is allowed to do. It's then utterly impossible, even for
someone who knows Python and SQL, to do damage. But more likely, what
you really want is a cut-down UI that simplifies things: if the user
is data-entry level, you take away all the admin-type options. It
might be possible to fiddle around in internals and gain elevated
access, but that's not an issue in many environments.

In any case, these are issues you'd need to figure out regardless of
the development model. Ultimately, you could treat the entire
computer, network, database, etc as a black box, and just look at two
entities: the human, and the UI s/he is using. All permissions issues
can be explained at that level.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Network/multi-user program Chris Angelico <rosuav@gmail.com> - 2014-07-22 04:26 +1000

csiph-web